mirror of
https://github.com/mirror/make.git
synced 2026-09-04 05:32:57 +08:00
Compare commits
398 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7241d136f4 | ||
|
|
c2be1df880 | ||
|
|
f1a9625001 | ||
|
|
047bd5a16f | ||
|
|
3fc99a48e1 | ||
|
|
87a5f98d24 | ||
|
|
53554e41e8 | ||
|
|
5bd7ad2b22 | ||
|
|
65115e7095 | ||
|
|
75dd0bd8bc | ||
|
|
8b54c5cff9 | ||
|
|
65c447289e | ||
|
|
86b20728fe | ||
|
|
b8a8af6550 | ||
|
|
360b76af84 | ||
|
|
c9e6ab9ac7 | ||
|
|
40277b8850 | ||
|
|
35047f824a | ||
|
|
e97159745d | ||
|
|
2b9dd215d5 | ||
|
|
fc2ddebdae | ||
|
|
b4682cb479 | ||
|
|
09202bc880 | ||
|
|
9ae02b7916 | ||
|
|
247b71e690 | ||
|
|
e33f3d72bf | ||
|
|
fd1dd7c398 | ||
|
|
14b2d7effb | ||
|
|
85c788572d | ||
|
|
8164c8ab3d | ||
|
|
fb7a7adc8a | ||
|
|
4f8be4bb28 | ||
|
|
e2b39edc22 | ||
|
|
8530d77c68 | ||
|
|
89e18c12eb | ||
|
|
bccd01354b | ||
|
|
5f9d341160 | ||
|
|
798ebd241b | ||
|
|
4db6d0c694 | ||
|
|
b754a35df7 | ||
|
|
168f12375d | ||
|
|
83443c706a | ||
|
|
4a5377aef7 | ||
|
|
48391c2817 | ||
|
|
42745a900f | ||
|
|
43181f1f82 | ||
|
|
c18b23f7b2 | ||
|
|
fe5585528f | ||
|
|
0205d3d08c | ||
|
|
9ef06be018 | ||
|
|
ac9a39dad7 | ||
|
|
c6ac580785 | ||
|
|
9efd477e98 | ||
|
|
5036dd120a | ||
|
|
7e849f3b81 | ||
|
|
a80a8b8a10 | ||
|
|
e4ac28e830 | ||
|
|
1fae20a2b7 | ||
|
|
292da6f686 | ||
|
|
3c487e7ed5 | ||
|
|
c0380823a2 | ||
|
|
1faae1d4ed | ||
|
|
18eb093f56 | ||
|
|
894ee7f6c8 | ||
|
|
e75662bc6a | ||
|
|
d1df4b21f3 | ||
|
|
a66bf2d736 | ||
|
|
31c2024b2e | ||
|
|
7df0fe77d8 | ||
|
|
9fc787c658 | ||
|
|
1afb0ad372 | ||
|
|
86a058029b | ||
|
|
0a3a0756b9 | ||
|
|
3712e8a819 | ||
|
|
9ed452b041 | ||
|
|
b11bef0bea | ||
|
|
bd716a1ec1 | ||
|
|
b484efca56 | ||
|
|
562344122f | ||
|
|
9a2451af0b | ||
|
|
7f9ce6e97b | ||
|
|
621e9edfe9 | ||
|
|
986632ec23 | ||
|
|
95ffcda425 | ||
|
|
dcca1b5b0e | ||
|
|
9cad73ad82 | ||
|
|
8e7a28a6a4 | ||
|
|
98de32a681 | ||
|
|
5369be5079 | ||
|
|
8de07f3e4a | ||
|
|
f970315766 | ||
|
|
579ee85941 | ||
|
|
7e51810bb5 | ||
|
|
bd30df4478 | ||
|
|
1f2fd22fec | ||
|
|
ab1210b1fe | ||
|
|
241787d8e4 | ||
|
|
faeeb27166 | ||
|
|
cab353d1dd | ||
|
|
8b01e6bebf | ||
|
|
55c00544cc | ||
|
|
8d577c2ff4 | ||
|
|
e44d6a12bb | ||
|
|
423c3955d9 | ||
|
|
ac67346d0f | ||
|
|
e364498113 | ||
|
|
85047eb904 | ||
|
|
0faa98a0bb | ||
|
|
8411528fdd | ||
|
|
d2a3e9ca9c | ||
|
|
e1863c05d8 | ||
|
|
b981bfd197 | ||
|
|
88713683fe | ||
|
|
a7cac0f0e3 | ||
|
|
165ccf3137 | ||
|
|
24620378ba | ||
|
|
9c8b68a905 | ||
|
|
432cb6575d | ||
|
|
a4937bc897 | ||
|
|
889303cdfe | ||
|
|
99385ee6f7 | ||
|
|
f5f5adb62c | ||
|
|
865d90bb1e | ||
|
|
30b25acc4e | ||
|
|
f8905059c3 | ||
|
|
12a3104c3d | ||
|
|
7b485daffb | ||
|
|
757849cd93 | ||
|
|
9d58570c77 | ||
|
|
d49ab08ae0 | ||
|
|
10a4b120bd | ||
|
|
309768aff1 | ||
|
|
9c28d5125d | ||
|
|
a7794f483b | ||
|
|
5d653b535a | ||
|
|
53b4a9e668 | ||
|
|
d4723d643d | ||
|
|
107ab16bf6 | ||
|
|
07f2666b91 | ||
|
|
f4b746b8c2 | ||
|
|
d7f25cfda5 | ||
|
|
b9a01a8b3b | ||
|
|
d654bff457 | ||
|
|
74ed682c54 | ||
|
|
e498e464dc | ||
|
|
d1d737d0fa | ||
|
|
87e5b64f41 | ||
|
|
70df3c35bf | ||
|
|
01a745025d | ||
|
|
4792e154b6 | ||
|
|
188b2a0f23 | ||
|
|
52191d9d61 | ||
|
|
dc9ae5e017 | ||
|
|
723e047428 | ||
|
|
b69b04dc8c | ||
|
|
b539908f73 | ||
|
|
2fb91e19a0 | ||
|
|
f96c114e22 | ||
|
|
98197303b1 | ||
|
|
f8786092ad | ||
|
|
1d4c15b4e1 | ||
|
|
b1c7f0df4e | ||
|
|
8e12202870 | ||
|
|
1f4ca0539b | ||
|
|
d0944ee2e8 | ||
|
|
38066b6f19 | ||
|
|
3bf3fde984 | ||
|
|
543521cd47 | ||
|
|
e8122ecb5d | ||
|
|
55a0c0e414 | ||
|
|
8a3436c65d | ||
|
|
fd30db1290 | ||
|
|
c3524b83b9 | ||
|
|
0296e40fc7 | ||
|
|
f69922b335 | ||
|
|
65931ce7a9 | ||
|
|
1a991ada47 | ||
|
|
7e77685bc3 | ||
|
|
300d1296fb | ||
|
|
822f8dae41 | ||
|
|
d2d44f76c4 | ||
|
|
6c3e88e60f | ||
|
|
9cd01958da | ||
|
|
4120f91846 | ||
|
|
30a5ee0d85 | ||
|
|
8a6205b43f | ||
|
|
bc120f27bd | ||
|
|
5c0fba7240 | ||
|
|
fa0f2c516a | ||
|
|
20ecc58126 | ||
|
|
1b90248893 | ||
|
|
a4d8444b59 | ||
|
|
0a81d50d66 | ||
|
|
3aa2aa7e82 | ||
|
|
29a94ceb76 | ||
|
|
ab78cbc71c | ||
|
|
c5bfa40044 | ||
|
|
deff9dacc9 | ||
|
|
40a49f244d | ||
|
|
87ac68fe79 | ||
|
|
72462ef1e1 | ||
|
|
f80222c15b | ||
|
|
4b81f5ca92 | ||
|
|
5601726151 | ||
|
|
9453a7451d | ||
|
|
5e7bf7c554 | ||
|
|
138d020e1b | ||
|
|
5b65c5b916 | ||
|
|
cc85b927cd | ||
|
|
bee4d93a59 | ||
|
|
353fcfdb30 | ||
|
|
d4043519f7 | ||
|
|
ef11217de7 | ||
|
|
e8f5d322cf | ||
|
|
dc922e3f4c | ||
|
|
c11024b3b3 | ||
|
|
2fc0f614be | ||
|
|
bf60bbd67a | ||
|
|
d2eaed1f0a | ||
|
|
8ab3564a71 | ||
|
|
ecf307bb0b | ||
|
|
a674abe702 | ||
|
|
80183457ad | ||
|
|
cece7ad61f | ||
|
|
943c06de47 | ||
|
|
171eb41908 | ||
|
|
9babfe49a5 | ||
|
|
b16852a77f | ||
|
|
96cf67bd29 | ||
|
|
5370238316 | ||
|
|
398058a873 | ||
|
|
b730fbc6b8 | ||
|
|
c21c1455fd | ||
|
|
58dae24352 | ||
|
|
c7732bd5ad | ||
|
|
2627d83221 | ||
|
|
381baeef7a | ||
|
|
5367d393dd | ||
|
|
f0529daced | ||
|
|
a668c520b2 | ||
|
|
c8bf04e141 | ||
|
|
0a56034aac | ||
|
|
94735f0ad7 | ||
|
|
7c77486d1f | ||
|
|
13f13b96b3 | ||
|
|
c3cd78066c | ||
|
|
15f7957939 | ||
|
|
1d992d8fe7 | ||
|
|
3484c9675a | ||
|
|
a0c5d0c63f | ||
|
|
64dd61bcb8 | ||
|
|
75336026ae | ||
|
|
b8467292c9 | ||
|
|
e44c51ce41 | ||
|
|
cb2be0db36 | ||
|
|
01bad6f73a | ||
|
|
82793f85f5 | ||
|
|
a66469e003 | ||
|
|
b5ea49bae7 | ||
|
|
2926f7b466 | ||
|
|
a87ff20158 | ||
|
|
9acb657eb1 | ||
|
|
19a69bafc0 | ||
|
|
9a7fe22b19 | ||
|
|
9253a34a57 | ||
|
|
f88eb23b02 | ||
|
|
441b643355 | ||
|
|
8b034b7d18 | ||
|
|
5667376edc | ||
|
|
93843ccd08 | ||
|
|
7f01830927 | ||
|
|
30843dea3a | ||
|
|
14d7654551 | ||
|
|
054d6d91e7 | ||
|
|
e56aad4061 | ||
|
|
049f8e88fc | ||
|
|
da7df54309 | ||
|
|
f3a4b4ce6f | ||
|
|
0daa9d37c4 | ||
|
|
50e2cb1b1a | ||
|
|
330d97a9ba | ||
|
|
b5d017c624 | ||
|
|
79e9347892 | ||
|
|
2bd957a89d | ||
|
|
7f7e6f80c5 | ||
|
|
af87d56157 | ||
|
|
4bf3c33f83 | ||
|
|
cb64352c75 | ||
|
|
6a52395ed1 | ||
|
|
29cd1e9699 | ||
|
|
450b7e1a3d | ||
|
|
5058a94ee7 | ||
|
|
4baf9ab456 | ||
|
|
ac1c6b404a | ||
|
|
51fb930ef2 | ||
|
|
a45f25ece3 | ||
|
|
b70aa3709e | ||
|
|
8e0a5645b8 | ||
|
|
7899c6f383 | ||
|
|
6ca41d9b17 | ||
|
|
686a74bfb2 | ||
|
|
ca17e5538f | ||
|
|
5c69b3fe53 | ||
|
|
1d298acf9d | ||
|
|
5a5a1aff6a | ||
|
|
002702c89c | ||
|
|
a3bd466e25 | ||
|
|
97fe6e7dd1 | ||
|
|
85f9f6985d | ||
|
|
0d12b1a207 | ||
|
|
299f5faf93 | ||
|
|
0d5d963bcf | ||
|
|
715927552f | ||
|
|
7670c84f77 | ||
|
|
2efd6b47bf | ||
|
|
ca8885d5be | ||
|
|
3a285e342e | ||
|
|
f263ff4ce9 | ||
|
|
fbe5b2c9cd | ||
|
|
a94b0b0ea5 | ||
|
|
b9c4a38022 | ||
|
|
90ee335724 | ||
|
|
7d3743dfdc | ||
|
|
a839588fc9 | ||
|
|
8a0d46468a | ||
|
|
bc578b6c8e | ||
|
|
1820908804 | ||
|
|
145661a541 | ||
|
|
a95dc485fa | ||
|
|
30b2e4207d | ||
|
|
7f5309ebb4 | ||
|
|
6cb5be7813 | ||
|
|
adb50bd4c9 | ||
|
|
cf1c79c9a3 | ||
|
|
76827d7c10 | ||
|
|
eb632d7676 | ||
|
|
fdb5fcc28d | ||
|
|
23c2b99e9d | ||
|
|
405c89ba1e | ||
|
|
a77c5c0910 | ||
|
|
88f1bc8b55 | ||
|
|
6405534814 | ||
|
|
c0751bd3fc | ||
|
|
1befa76448 | ||
|
|
e3b394f3f0 | ||
|
|
ef6461611b | ||
|
|
fca11f6039 | ||
|
|
d6e1c6e6c5 | ||
|
|
aa07c06387 | ||
|
|
dc25e84754 | ||
|
|
666ad44568 | ||
|
|
dddd1be5ec | ||
|
|
eb4f966971 | ||
|
|
715a11735f | ||
|
|
89f7058b99 | ||
|
|
9fb4cdeedb | ||
|
|
0bdc191501 | ||
|
|
49cc211819 | ||
|
|
4e2e5eb199 | ||
|
|
3f6bb04e75 | ||
|
|
c992c4d80f | ||
|
|
3057357c0a | ||
|
|
cb0bedc3d0 | ||
|
|
dc2a6ceb81 | ||
|
|
4f47fbf953 | ||
|
|
9fcd90e36c | ||
|
|
83ce81fcaa | ||
|
|
63888b91f6 | ||
|
|
934f51d166 | ||
|
|
bfc3e1ca7c | ||
|
|
c7d07fd0b5 | ||
|
|
d472624f33 | ||
|
|
0369a93825 | ||
|
|
ef2b0425e7 | ||
|
|
a5c774a51b | ||
|
|
9a9f83e8b5 | ||
|
|
e4d5d43424 | ||
|
|
b06b8c64a2 | ||
|
|
f15efca811 | ||
|
|
b664d3a91d | ||
|
|
b5c065418f | ||
|
|
bd6f63e563 | ||
|
|
6979e7e43b | ||
|
|
dc90160079 | ||
|
|
a81ee5209b | ||
|
|
15a79d723d | ||
|
|
b34438bee8 | ||
|
|
1454a04f81 | ||
|
|
ae2ab76fac | ||
|
|
391456aad7 | ||
|
|
a86d1693ba | ||
|
|
3b1432d86a | ||
|
|
c3188c6f31 | ||
|
|
5acda13ace | ||
|
|
036760a9fd | ||
|
|
91be515567 | ||
|
|
b6b6875986 | ||
|
|
8f029808af |
35
.cvsignore
35
.cvsignore
@@ -1,35 +0,0 @@
|
|||||||
*.gz *.Z *.tar *.tgz
|
|
||||||
=*
|
|
||||||
TODO COPYING* ABOUT-NLS
|
|
||||||
make-3* make-test*
|
|
||||||
*.info *.info-*
|
|
||||||
stamp-*
|
|
||||||
makebook*
|
|
||||||
|
|
||||||
.*gdbinit
|
|
||||||
.gdb_history
|
|
||||||
|
|
||||||
*.dep *.dvi *.toc *.aux *.log
|
|
||||||
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
|
||||||
|
|
||||||
README README.DOS README.W32 README.OS2
|
|
||||||
aclocal.m4 autom4te.cache
|
|
||||||
config.h.in config.h config.status config.cache configure
|
|
||||||
Makefile.in Makefile
|
|
||||||
build.sh.in build.sh
|
|
||||||
SMakefile NMakefile Makefile.DOS
|
|
||||||
config.ami configh.dos config.h.W32 config.h-vms
|
|
||||||
|
|
||||||
loadavg loadavg.c make
|
|
||||||
|
|
||||||
.deps .dep_segment ID TAGS
|
|
||||||
|
|
||||||
_*
|
|
||||||
sun4 i386 i386-netbsd hp300-netbsd hp300 rs6000 sun3 news800 amiga
|
|
||||||
hp700 hp834 mips sol2 i486-linux
|
|
||||||
|
|
||||||
customs
|
|
||||||
|
|
||||||
install-sh mkinstalldirs
|
|
||||||
|
|
||||||
.directive.asc
|
|
||||||
62
.gitignore
vendored
Normal file
62
.gitignore
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# Development artifacts
|
||||||
|
ID
|
||||||
|
TAGS
|
||||||
|
.*gdbinit
|
||||||
|
.gdb_history
|
||||||
|
*~
|
||||||
|
#*
|
||||||
|
.#*
|
||||||
|
|
||||||
|
# Configure artifacts
|
||||||
|
ABOUT-NLS
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
config.cache
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
configure
|
||||||
|
stamp-h1
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
.deps
|
||||||
|
gmk-default.h
|
||||||
|
loadavg
|
||||||
|
make
|
||||||
|
*.o
|
||||||
|
*.exe
|
||||||
|
*.dll.a
|
||||||
|
*.obj
|
||||||
|
*.lib
|
||||||
|
*.pdb
|
||||||
|
*.sbr
|
||||||
|
|
||||||
|
# Windows build artifacts
|
||||||
|
/WinDebug/
|
||||||
|
/WinRel/
|
||||||
|
/GccDebug/
|
||||||
|
/GccRel/
|
||||||
|
|
||||||
|
# Distribution artifacts
|
||||||
|
.dep_segment
|
||||||
|
.check-git-HEAD
|
||||||
|
ChangeLog
|
||||||
|
Makefile.DOS
|
||||||
|
NMakefile
|
||||||
|
README
|
||||||
|
README.DOS
|
||||||
|
README.OS2
|
||||||
|
README.W32
|
||||||
|
SMakefile
|
||||||
|
build.sh
|
||||||
|
build.sh.in
|
||||||
|
config.ami
|
||||||
|
config.h-vms
|
||||||
|
config.h.W32
|
||||||
|
configh.dos
|
||||||
|
make-[0-9]*/
|
||||||
|
make-[0-9]*.tar.*
|
||||||
|
checkcfg.*.log
|
||||||
13
AUTHORS
13
AUTHORS
@@ -37,17 +37,20 @@ GNU make porting efforts:
|
|||||||
Port to MS-DOS (DJGPP), OS/2, and MS-Windows (native/MinGW) by:
|
Port to MS-DOS (DJGPP), OS/2, and MS-Windows (native/MinGW) by:
|
||||||
DJ Delorie <dj@delorie.com>
|
DJ Delorie <dj@delorie.com>
|
||||||
Rob Tulloh <rob_tulloh@tivoli.com>
|
Rob Tulloh <rob_tulloh@tivoli.com>
|
||||||
Eli Zaretskii <eliz@is.elta.co.il>
|
Eli Zaretskii <eliz@gnu.org>
|
||||||
Jonathan Grant <jg@jguk.org>
|
Jonathan Grant <jg@jguk.org>
|
||||||
Andreas Beuning <andreas.buening@nexgo.de>
|
Andreas Beuning <andreas.buening@nexgo.de>
|
||||||
Earnie Boyd <earnie@uses.sf.net>
|
Earnie Boyd <earnie@uses.sf.net>
|
||||||
|
Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Other contributors:
|
Other contributors:
|
||||||
|
|
||||||
Janet Carson <janet_carson@tivoli.com>
|
Janet Carson <janet_carson@tivoli.com>
|
||||||
Howard Chu <hyc@highlandsun.com>
|
Howard Chu <hyc@highlandsun.com>
|
||||||
|
Ludovic Courtès <ludo@gnu.org>
|
||||||
Paul Eggert <eggert@twinsun.com>
|
Paul Eggert <eggert@twinsun.com>
|
||||||
|
Ramon Garcia Fernandez <ramon.garcia.f@gmail.com>
|
||||||
Klaus Heinz <kamar@ease.rhein-main.de>
|
Klaus Heinz <kamar@ease.rhein-main.de>
|
||||||
Michael Joosten
|
Michael Joosten
|
||||||
Jim Kelton <jim_kelton@tivoli.com>
|
Jim Kelton <jim_kelton@tivoli.com>
|
||||||
@@ -55,19 +58,21 @@ Other contributors:
|
|||||||
Tim Magill <tim.magill@telops.gte.com>
|
Tim Magill <tim.magill@telops.gte.com>
|
||||||
Markus Mauhart <qwe123@chello.at>
|
Markus Mauhart <qwe123@chello.at>
|
||||||
Greg McGary <greg@mcgary.org>
|
Greg McGary <greg@mcgary.org>
|
||||||
|
Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||||
Thomas Riedl <thomas.riedl@siemens.com>
|
Thomas Riedl <thomas.riedl@siemens.com>
|
||||||
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
||||||
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
Carl Staelin (Princeton University)
|
Carl Staelin (Princeton University)
|
||||||
Ian Stewartson (Data Logic Limited)
|
Ian Stewartson (Data Logic Limited)
|
||||||
Ramon Garcia Fernandez <ramon.garcia.f@gmail.com>
|
David A. Wheeler <dwheeler@dwheeler.com>
|
||||||
|
David Boyce <dsb@boyski.com>
|
||||||
|
Frank Heckenbach <f.heckenbach@fh-soft.de>
|
||||||
|
|
||||||
With suggestions/comments/bug reports from a cast of ... well ...
|
With suggestions/comments/bug reports from a cast of ... well ...
|
||||||
hundreds, anyway :)
|
hundreds, anyway :)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
12
ChangeLog.1
12
ChangeLog.1
@@ -1703,7 +1703,7 @@ Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
|||||||
existing variable's origin, is `o_env', make it `o_env_override'.
|
existing variable's origin, is `o_env', make it `o_env_override'.
|
||||||
|
|
||||||
* load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
|
* load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
|
||||||
* compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
|
* compatMakefile: Changed the comment for `LOAD_AVG' accordingly.
|
||||||
|
|
||||||
Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||||
|
|
||||||
@@ -3218,7 +3218,7 @@ Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
|||||||
* variable.c (expand_function: `shell'): Use
|
* variable.c (expand_function: `shell'): Use
|
||||||
`shell_function_completed'. Block children before forking and
|
`shell_function_completed'. Block children before forking and
|
||||||
unblock after `shell_function_pid' is set properly and
|
unblock after `shell_function_pid' is set properly and
|
||||||
`shell_functon_completed' is reset to 0.
|
`shell_function_completed' is reset to 0.
|
||||||
|
|
||||||
* commands.c (child_handler): When the child of the `shell' function
|
* commands.c (child_handler): When the child of the `shell' function
|
||||||
completes, set `shell_function_completed' to 1 if it actually ran,
|
completes, set `shell_function_completed' to 1 if it actually ran,
|
||||||
@@ -4465,7 +4465,7 @@ Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
`maxsuffix', and must be called before count_implicit_rule_limits.
|
`maxsuffix', and must be called before count_implicit_rule_limits.
|
||||||
|
|
||||||
* rule.c (pattern_search): If an existent (non-intermediate)
|
* rule.c (pattern_search): If an existent (non-intermediate)
|
||||||
dependendency was found via a terminal rule, set its
|
dependency was found via a terminal rule, set its
|
||||||
`tried_implicit' flag, so it will never have implicit rule search done.
|
`tried_implicit' flag, so it will never have implicit rule search done.
|
||||||
|
|
||||||
* glob.c: Bug fix to avoid alloca(0).
|
* glob.c: Bug fix to avoid alloca(0).
|
||||||
@@ -4826,7 +4826,7 @@ Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
new entry as the old entry's prev pointer.
|
new entry as the old entry's prev pointer.
|
||||||
|
|
||||||
* dir.c: Re-indented the `struct dir' definition to be right.
|
* dir.c: Re-indented the `struct dir' definition to be right.
|
||||||
(dir_load): Cleaned up slighty.
|
(dir_load): Cleaned up slightly.
|
||||||
(file_exists_p): Removed comment saying we could use `access', since
|
(file_exists_p): Removed comment saying we could use `access', since
|
||||||
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
||||||
|
|
||||||
@@ -4981,9 +4981,7 @@ Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 Free
|
|
||||||
Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -3080,7 +3080,7 @@ Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
|
|||||||
* main.c: (main), variable.c Changed handling of ENV-vars. Make
|
* main.c: (main), variable.c Changed handling of ENV-vars. Make
|
||||||
stores now the names of the variables only and reads their contents
|
stores now the names of the variables only and reads their contents
|
||||||
when they are accessed to reflect that these variables are really
|
when they are accessed to reflect that these variables are really
|
||||||
global (ie. they CAN change WHILE make runs !) This handling is
|
global (i.e., they CAN change WHILE make runs !) This handling is
|
||||||
made in lookup_variable()
|
made in lookup_variable()
|
||||||
|
|
||||||
* Makefile.ami: renamed file.h to filedep.h
|
* Makefile.ami: renamed file.h to filedep.h
|
||||||
@@ -6630,15 +6630,14 @@ Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
See ChangeLog.1, available in the CVS repository at:
|
See ChangeLog.1, available in the Git repository at:
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group=make
|
http://git.savannah.gnu.org/cgit/make.git/tree/
|
||||||
|
|
||||||
for earlier changes.
|
for earlier changes.
|
||||||
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright (C) 1991-2007 Free Software Foundation, Inc.
|
||||||
2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,7 @@
|
|||||||
# -*-Makefile-*- template for DJGPP
|
# -*-Makefile-*- template for DJGPP
|
||||||
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||||
#
|
#
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
# Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
# 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -89,7 +88,7 @@ INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(pre
|
|||||||
|
|
||||||
BUILT_SOURCES = README build.sh-in
|
BUILT_SOURCES = README build.sh-in
|
||||||
|
|
||||||
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms readme.vms vmsdir.h vmsfunctions.c vmsify.c
|
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms README.VMS vmsdir.h vmsfunctions.c vmsify.c gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
SUBDIRS = glob doc
|
SUBDIRS = glob doc
|
||||||
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||||
@@ -123,7 +122,7 @@ man1dir = $(mandir)/man1
|
|||||||
MANS = $(man_MANS)
|
MANS = $(man_MANS)
|
||||||
|
|
||||||
NROFF = nroff
|
NROFF = nroff
|
||||||
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.in getloadavg.c
|
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.ac getloadavg.c
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
@@ -507,7 +506,7 @@ html
|
|||||||
#
|
#
|
||||||
dist-hook:
|
dist-hook:
|
||||||
(cd $(srcdir); \
|
(cd $(srcdir); \
|
||||||
w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \
|
w32=`find w32 -follow \( -name .git -prune \) -o -type f -print`; \
|
||||||
tar chf - $$w32) \
|
tar chf - $$w32) \
|
||||||
| (cd $(distdir); tar xfBp -)
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
|
|||||||
76
Makefile.am
76
Makefile.am
@@ -1,7 +1,6 @@
|
|||||||
# This is a -*-Makefile-*-, or close enough
|
# This is a -*-Makefile-*-, or close enough
|
||||||
#
|
#
|
||||||
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
# Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -17,8 +16,8 @@
|
|||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
|
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options
|
||||||
ACLOCAL_AMFLAGS = -I config
|
ACLOCAL_AMFLAGS = -I config
|
||||||
|
|
||||||
MAKE_HOST = @MAKE_HOST@
|
MAKE_HOST = @MAKE_HOST@
|
||||||
|
|
||||||
@@ -27,11 +26,15 @@ if WINDOWSENV
|
|||||||
MAYBE_W32 = w32
|
MAYBE_W32 = w32
|
||||||
W32INC = -I $(top_srcdir)/w32/include
|
W32INC = -I $(top_srcdir)/w32/include
|
||||||
W32LIB = -Lw32 -lw32
|
W32LIB = -Lw32 -lw32
|
||||||
|
ossrc =
|
||||||
|
else
|
||||||
|
ossrc = posixos.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = glob config po doc $(MAYBE_W32)
|
SUBDIRS = glob config po doc $(MAYBE_W32)
|
||||||
|
|
||||||
bin_PROGRAMS = make
|
bin_PROGRAMS = make
|
||||||
|
include_HEADERS = gnumake.h
|
||||||
|
|
||||||
if USE_CUSTOMS
|
if USE_CUSTOMS
|
||||||
remote = remote-cstms.c
|
remote = remote-cstms.c
|
||||||
@@ -39,18 +42,19 @@ else
|
|||||||
remote = remote-stub.c
|
remote = remote-stub.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||||
function.c getopt.c getopt1.c implicit.c job.c main.c \
|
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
|
||||||
misc.c read.c remake.c $(remote) rule.c signame.c \
|
loadapi.c main.c misc.c $(ossrc) output.c read.c remake.c \
|
||||||
strcache.c variable.c version.c vpath.c hash.c
|
rule.c signame.c strcache.c variable.c version.c vpath.c \
|
||||||
|
hash.c $(remote)
|
||||||
|
|
||||||
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
||||||
|
|
||||||
noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
|
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
|
||||||
debug.h getopt.h gettext.h hash.h
|
debug.h getopt.h gettext.h hash.h output.h os.h
|
||||||
|
|
||||||
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
|
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
|
||||||
|
$(GUILE_LIBS)
|
||||||
# Only process if target is MS-Windows
|
# Only process if target is MS-Windows
|
||||||
if WINDOWSENV
|
if WINDOWSENV
|
||||||
make_LDADD += $(W32LIB)
|
make_LDADD += $(W32LIB)
|
||||||
@@ -61,6 +65,7 @@ man_MANS = make.1
|
|||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||||
|
|
||||||
AM_CPPFLAGS = $(GLOBINC)
|
AM_CPPFLAGS = $(GLOBINC)
|
||||||
|
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||||
# Only process if target is MS-Windows
|
# Only process if target is MS-Windows
|
||||||
if WINDOWSENV
|
if WINDOWSENV
|
||||||
AM_CPPFLAGS += $(W32INC)
|
AM_CPPFLAGS += $(W32INC)
|
||||||
@@ -76,20 +81,15 @@ EXTRA_DIST = README build.sh.in $(man_MANS) \
|
|||||||
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||||
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
||||||
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
||||||
readme.vms makefile.vms makefile.com config.h-vms \
|
README.VMS makefile.vms makefile.com config.h-vms \
|
||||||
vmsdir.h vmsfunctions.c vmsify.c
|
vmsdir.h vmsfunctions.c vmsify.c vms_exit.c vms_progname.c \
|
||||||
|
vms_export_symbol.c vms_export_symbol_test.com \
|
||||||
|
gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
# This is built during configure, but behind configure's back
|
# This is built during configure, but behind configure's back
|
||||||
|
|
||||||
DISTCLEANFILES = build.sh
|
DISTCLEANFILES = build.sh
|
||||||
|
|
||||||
# Forward targets
|
|
||||||
|
|
||||||
html:
|
|
||||||
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
|
||||||
|
|
||||||
.PHONY: html
|
|
||||||
|
|
||||||
# --------------- Internationalization Section
|
# --------------- Internationalization Section
|
||||||
|
|
||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
@@ -100,8 +100,8 @@ localedir = $(datadir)/locale
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
#
|
#
|
||||||
inst_setgid = @NEED_SETGID@
|
inst_setgid = @NEED_SETGID@
|
||||||
@@ -117,19 +117,28 @@ install-exec-local:
|
|||||||
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
||||||
else \
|
else \
|
||||||
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
|
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
|
||||||
echo "otherwise the \`-l' option will probably not work."; \
|
echo "otherwise the '-l' option will probably not work."; \
|
||||||
echo "You may need special privileges to complete the installation"; \
|
echo "You may need special privileges to complete the installation"; \
|
||||||
echo "of $$app."; \
|
echo "of $$app."; \
|
||||||
fi; \
|
fi; \
|
||||||
else true; fi
|
else true; fi
|
||||||
|
|
||||||
|
# --------------- Generate the Guile default module content
|
||||||
|
|
||||||
|
guile.$(OBJEXT): gmk-default.h
|
||||||
|
gmk-default.h: $(srcdir)/gmk-default.scm
|
||||||
|
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
||||||
|
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
||||||
|
$(srcdir)/gmk-default.scm \
|
||||||
|
&& echo '";') > $@
|
||||||
|
|
||||||
# --------------- Local DIST Section
|
# --------------- Local DIST Section
|
||||||
|
|
||||||
# Install the w32 and tests subdirectories
|
# Install the w32 and tests subdirectories
|
||||||
#
|
#
|
||||||
dist-hook:
|
dist-hook:
|
||||||
(cd $(srcdir); \
|
(cd $(srcdir); \
|
||||||
sub=`find w32 tests -follow \( -name CVS -prune -o -name .cvsignore -o -name work -prune \) -o \( -name \*.orig -o -name \*.rej -o -name \*~ -prune \) -o -type f -print`; \
|
sub=`find w32 tests -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
|
||||||
tar chf - $$sub) \
|
tar chf - $$sub) \
|
||||||
| (cd $(distdir); tar xfBp -)
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
@@ -167,31 +176,32 @@ loadavg_LDADD = @GETLOADAVG_LIBS@
|
|||||||
#
|
#
|
||||||
MAKETESTFLAGS =
|
MAKETESTFLAGS =
|
||||||
|
|
||||||
check-regression:
|
check-regression: tests/config-flags.pm
|
||||||
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
@if test -f '$(srcdir)/tests/run_make_tests'; then \
|
||||||
|
ulimit -n 128; \
|
||||||
if $(PERL) -v >/dev/null 2>&1; then \
|
if $(PERL) -v >/dev/null 2>&1; then \
|
||||||
case `cd $(srcdir); pwd` in `pwd`) : ;; \
|
case `cd '$(srcdir)'; pwd` in `pwd`) : ;; \
|
||||||
*) test -d tests || mkdir tests; \
|
*) test -d tests || mkdir tests; \
|
||||||
rm -f srctests; \
|
rm -f srctests; \
|
||||||
if ln -s "$(srcdir)/tests" srctests; then \
|
if ln -s '$(srcdir)/tests' srctests; then \
|
||||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
||||||
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
||||||
done; fi ;; \
|
done; fi ;; \
|
||||||
esac; \
|
esac; \
|
||||||
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
echo "cd tests && $(PERL) ./run_make_tests.pl -srcdir $(abs_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||||
cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
|
cd tests && $(PERL) ./run_make_tests.pl -srcdir '$(abs_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
|
||||||
else \
|
else \
|
||||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||||
fi; \
|
fi; \
|
||||||
else \
|
else \
|
||||||
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# --------------- Maintainer's Section
|
# --------------- Maintainer's Section
|
||||||
|
|
||||||
# Tell automake that I haven't forgotten about this file and it will be
|
# Tell automake that I haven't forgotten about this file and it will be
|
||||||
# created before we build a distribution (see maintMakefile in the CVS
|
# created before we build a distribution (see maintMakefile in the Git
|
||||||
# distribution).
|
# distribution).
|
||||||
|
|
||||||
README:
|
README:
|
||||||
|
|||||||
103
Makefile.ami
103
Makefile.ami
@@ -1,10 +1,9 @@
|
|||||||
# -*-Makefile-*- for GNU make on Amiga
|
# -*-Makefile-*- for GNU make on Amiga
|
||||||
#
|
#
|
||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# NOTE: If you have no 'make' program at all to process this makefile, run
|
||||||
# `build.sh' instead.
|
# 'build.sh' instead.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -32,18 +31,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -77,9 +76,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -89,20 +88,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -118,21 +117,24 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
#guile = guile.o
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
|
||||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras)
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
|
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||||
|
|
||||||
|
|
||||||
@@ -142,7 +144,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
@@ -179,8 +181,6 @@ glob/libglob.a: FORCE config.h
|
|||||||
cd glob; $(MAKE) libglob.a
|
cd glob; $(MAKE) libglob.a
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
tagsrcs = $(srcs) $(srcdir)remote-*.c
|
|
||||||
|
|
||||||
.PHONY: install installdirs
|
.PHONY: install installdirs
|
||||||
install: installdirs \
|
install: installdirs \
|
||||||
$(bindir)$(binprefix)make $(infodir)make.info \
|
$(bindir)$(binprefix)make $(infodir)make.info \
|
||||||
@@ -196,7 +196,7 @@ $(bindir)$(binprefix)make: make
|
|||||||
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
||||||
else \
|
else \
|
||||||
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
||||||
echo "otherwise the \`-l' option will probably not work."; \
|
echo "otherwise the '-l' option will probably not work."; \
|
||||||
echo "You may need special privileges to install $@."; \
|
echo "You may need special privileges to install $@."; \
|
||||||
fi; \
|
fi; \
|
||||||
else true; fi
|
else true; fi
|
||||||
@@ -213,9 +213,9 @@ $(infodir)make.info: make.info
|
|||||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
||||||
done
|
done
|
||||||
# Run install-info only if it exists.
|
# Run install-info only if it exists.
|
||||||
# Use `if' instead of just prepending `-' to the
|
# Use 'if' instead of just prepending '-' to the
|
||||||
# line so we notice real errors from install-info.
|
# line so we notice real errors from install-info.
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
# We use '$(SHELL) -c' because some shells do not
|
||||||
# fail gracefully when there is an unknown command.
|
# fail gracefully when there is an unknown command.
|
||||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||||
@@ -266,42 +266,43 @@ glob-clean glob-realclean:
|
|||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
||||||
# The automatically generated dependencies below may omit config.h
|
# The automatically generated dependencies below may omit config.h
|
||||||
# because it is included with ``#include <config.h>'' rather than
|
# because it is included with '#include <config.h>' rather than
|
||||||
# ``#include "config.h"''. So we add the explicit dependency to make sure.
|
# '#include "config.h"'. So we add the explicit dependency to make sure.
|
||||||
$(objs): config.h
|
$(objs): config.h
|
||||||
|
|
||||||
# Automatically generated dependencies will be put at the end of the file.
|
# Automatically generated dependencies will be put at the end of the file.
|
||||||
|
|
||||||
# Automatically generated dependencies.
|
# Automatically generated dependencies.
|
||||||
commands.o: commands.c make.h dep.h filedef.h variable.h job.h \
|
commands.o: commands.c makeint.h dep.h filedef.h variable.h job.h \
|
||||||
commands.h
|
commands.h
|
||||||
job.o: job.c make.h job.h filedef.h commands.h variable.h
|
job.o: job.c makeint.h job.h filedef.h commands.h variable.h
|
||||||
dir.o: dir.c make.h
|
dir.o: dir.c makeint.h
|
||||||
file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
|
file.o: file.c makeint.h dep.h filedef.h job.h commands.h variable.h
|
||||||
misc.o: misc.c make.h dep.h
|
misc.o: misc.c makeint.h dep.h
|
||||||
main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
|
main.o: main.c makeint.h dep.h filedef.h variable.h job.h commands.h \
|
||||||
getopt.h
|
getopt.h
|
||||||
read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
|
guile.o: guile.c makeint.h dep.h debug.h variable.h gmk-default.h
|
||||||
|
read.o: read.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||||
glob/glob.h
|
glob/glob.h
|
||||||
remake.o: remake.c make.h filedef.h job.h commands.h dep.h
|
remake.o: remake.c makeint.h filedef.h job.h commands.h dep.h
|
||||||
rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \
|
rule.o: rule.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||||
rule.h
|
rule.h
|
||||||
implicit.o: implicit.c make.h rule.h dep.h filedef.h
|
implicit.o: implicit.c makeint.h rule.h dep.h filedef.h
|
||||||
default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \
|
default.o: default.c makeint.h rule.h dep.h filedef.h job.h commands.h \
|
||||||
variable.h
|
variable.h
|
||||||
variable.o: variable.c make.h dep.h filedef.h job.h commands.h \
|
variable.o: variable.c makeint.h dep.h filedef.h job.h commands.h \
|
||||||
variable.h
|
variable.h
|
||||||
expand.o: expand.c make.h filedef.h job.h commands.h variable.h
|
expand.o: expand.c makeint.h filedef.h job.h commands.h variable.h
|
||||||
function.o: function.c make.h filedef.h variable.h dep.h job.h \
|
function.o: function.c makeint.h filedef.h variable.h dep.h job.h \
|
||||||
commands.h amiga.h
|
commands.h amiga.h
|
||||||
vpath.o: vpath.c make.h filedef.h variable.h
|
vpath.o: vpath.c makeint.h filedef.h variable.h
|
||||||
strcache.o: strcache.c make.h hash.h
|
strcache.o: strcache.c makeint.h hash.h
|
||||||
version.o: version.c
|
version.o: version.c
|
||||||
ar.o: ar.c make.h filedef.h dep.h
|
ar.o: ar.c makeint.h filedef.h dep.h
|
||||||
arscan.o: arscan.c make.h
|
arscan.o: arscan.c makeint.h
|
||||||
signame.o: signame.c signame.h
|
signame.o: signame.c signame.h
|
||||||
remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h
|
remote-stub.o: remote-stub.c makeint.h filedef.h job.h commands.h
|
||||||
getopt.o: getopt.c
|
getopt.o: getopt.c
|
||||||
getopt1.o : getopt1.c getopt.h
|
getopt1.o : getopt1.c getopt.h
|
||||||
getloadavg.o: getloadavg.c
|
getloadavg.o: getloadavg.c
|
||||||
amiga.o: amiga.c make.h variable.h amiga.h
|
amiga.o: amiga.c makeint.h variable.h amiga.h
|
||||||
|
|||||||
516
NEWS
516
NEWS
@@ -1,6 +1,6 @@
|
|||||||
GNU make NEWS -*-indented-text-*-
|
GNU make NEWS -*-indented-text-*-
|
||||||
History of user-visible changes.
|
History of user-visible changes.
|
||||||
28 July 2010
|
11 Apr 2016
|
||||||
|
|
||||||
See the end of this file for copyrights and conditions.
|
See the end of this file for copyrights and conditions.
|
||||||
|
|
||||||
@@ -9,7 +9,198 @@ manual, which is contained in this distribution as the file doc/make.texi.
|
|||||||
See the README file and the GNU make manual for instructions for
|
See the README file and the GNU make manual for instructions for
|
||||||
reporting bugs.
|
reporting bugs.
|
||||||
|
|
||||||
Version 3.82
|
Version 4.1.90 (11 Apr 2016)
|
||||||
|
|
||||||
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
|
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=106&set=custom
|
||||||
|
|
||||||
|
* New variable: $(.SHELLSTATUS) is set to the exit status of the last != or
|
||||||
|
$(shell ...) function invoked in this instance of make. This will be "0" if
|
||||||
|
successful or not "0" if not successful. The variable value is unset if no
|
||||||
|
!= or $(shell ...) function has been invoked.
|
||||||
|
|
||||||
|
* The $(file ...) function can now read from a file with $(file <FILE).
|
||||||
|
The function is expanded to the contents of the file. The contents are
|
||||||
|
expanded verbatim except that the final newline, if any, is stripped.
|
||||||
|
|
||||||
|
* The makefile line numbers shown by GNU make now point directly to the
|
||||||
|
specific line in the recipe where the failure or warning occurred.
|
||||||
|
Sample changes suggested by Brian Vandenberg <phantall@gmail.com>
|
||||||
|
|
||||||
|
* The interface to GNU make's "jobserver" is stable as documented in the
|
||||||
|
manual, for tools which may want to access it.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility! The internal-only command line option
|
||||||
|
--jobserver-fds has been renamed for publishing, to --jobserver-auth.
|
||||||
|
|
||||||
|
* The amount of parallelism can be determined by querying MAKEFLAGS, even when
|
||||||
|
the job server is enabled (previously MAKEFLAGS would always contain only
|
||||||
|
"-j", with no number, when job server was enabled).
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* Perl test harness now works.
|
||||||
|
|
||||||
|
* Full support for converting Unix exit status codes to VMS exit status
|
||||||
|
codes. BACKWARD INCOMPATIBILITY Notice: On a child failure the VMS exit
|
||||||
|
code is now the encoded Unix exit status that Make usually generates, not
|
||||||
|
the VMS exit status of the child.
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.1 (05 Oct 2014)
|
||||||
|
|
||||||
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
|
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=105&set=custom
|
||||||
|
|
||||||
|
* New variables: $(MAKE_TERMOUT) and $(MAKE_TERMERR) are set to non-empty
|
||||||
|
values if stdout or stderr, respectively, are believed to be writing to a
|
||||||
|
terminal. These variables are exported by default.
|
||||||
|
|
||||||
|
* Allow a no-text-argument form of the $(file ...) function. Without a text
|
||||||
|
argument nothing is written to the file: it is simply opened in the
|
||||||
|
requested mode, then closed again.
|
||||||
|
|
||||||
|
* Change the fatal error for mixed explicit and implicit rules, that was
|
||||||
|
introduced in GNU make 3.82, to a non-fatal error. However, this syntax is
|
||||||
|
still deprecated and may return to being illegal in a future version of GNU
|
||||||
|
make. Makefiles that rely on this syntax should be fixed.
|
||||||
|
See https://savannah.gnu.org/bugs/?33034
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* Support for library files added, including support for using the GNV ar
|
||||||
|
utility.
|
||||||
|
|
||||||
|
* Partial support for properly encoding Unix exit status codes into VMS exit
|
||||||
|
status codes.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility! These are different exit status codes
|
||||||
|
than Make exited with in the past.
|
||||||
|
|
||||||
|
* Macros to hold the current make command are set up to translate the
|
||||||
|
argv[0] string to a VMS format path name and prefix it with "MCR " so that
|
||||||
|
the macro has a space in it.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility! This may break complex makefiles that
|
||||||
|
do processing on those macros. This is unlikely because so much in that
|
||||||
|
area was not and is still not currently working on VMS, it is unlikely to
|
||||||
|
find such a complex makefile, so this is more likely to impact
|
||||||
|
construction of a future makefile.
|
||||||
|
|
||||||
|
* A command file is always used to run the commands for a recipe.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility! Running the make self tests has
|
||||||
|
exposed that there are significant differences in behavior when running
|
||||||
|
with the command file mode. It is unknown if this will be noticed by most
|
||||||
|
existing VMS makefiles.
|
||||||
|
|
||||||
|
Version 4.0 (09 Oct 2013)
|
||||||
|
|
||||||
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
|
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101&set=custom
|
||||||
|
|
||||||
|
* WARNING: Backward-incompatibility!
|
||||||
|
If .POSIX is specified, then make adheres to the POSIX backslash/newline
|
||||||
|
handling requirements, which introduces the following changes to the
|
||||||
|
standard backslash/newline handling in non-recipe lines:
|
||||||
|
* Any trailing space before the backslash is preserved
|
||||||
|
* Each backslash/newline (plus subsequent whitespace) is converted to a
|
||||||
|
single space
|
||||||
|
|
||||||
|
* New feature: GNU Guile integration
|
||||||
|
This version of GNU make can be compiled with GNU Guile integration.
|
||||||
|
GNU Guile serves as an embedded extension language for make.
|
||||||
|
See the "Guile Function" section in the GNU Make manual for details.
|
||||||
|
Currently GNU Guile 1.8 and 2.0+ are supported. In Guile 1.8 there is no
|
||||||
|
support for internationalized character sets. In Guile 2.0+, scripts can be
|
||||||
|
encoded in UTF-8.
|
||||||
|
|
||||||
|
* New command line option: --output-sync (-O) enables grouping of output by
|
||||||
|
target or by recursive make. This is useful during parallel builds to avoid
|
||||||
|
mixing output from different jobs together giving hard-to-understand
|
||||||
|
results. Original implementation by David Boyce <dsb@boyski.com>.
|
||||||
|
Reworked and enhanced by Frank Heckenbach <f.heckenbach@fh-soft.de>.
|
||||||
|
Windows support by Eli Zaretskii <eliz@gnu.org>.
|
||||||
|
|
||||||
|
* New command line option: --trace enables tracing of targets. When enabled
|
||||||
|
the recipe to be invoked is printed even if it would otherwise be suppressed
|
||||||
|
by .SILENT or a "@" prefix character. Also before each recipe is run the
|
||||||
|
makefile name and linenumber where it was defined are shown as well as the
|
||||||
|
prerequisites that caused the target to be considered out of date.
|
||||||
|
|
||||||
|
* New command line option argument: --debug now accepts a "n" (none) flag
|
||||||
|
which disables all debugging settings that are currently enabled.
|
||||||
|
|
||||||
|
* New feature: The "job server" capability is now supported on Windows.
|
||||||
|
Implementation contributed by Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
|
||||||
|
* New feature: The .ONESHELL capability is now supported on Windows. Support
|
||||||
|
added by Eli Zaretskii <eliz@gnu.org>.
|
||||||
|
|
||||||
|
* New feature: "!=" shell assignment operator as an alternative to the
|
||||||
|
$(shell ...) function. Implemented for compatibility with BSD makefiles.
|
||||||
|
Note there are subtle differences between "!=" and $(shell ...). See the
|
||||||
|
description in the GNU make manual.
|
||||||
|
WARNING: Backward-incompatibility!
|
||||||
|
Variables ending in "!" previously defined as "variable!= value" will now be
|
||||||
|
interpreted as shell assignment. Change your assignment to add whitespace
|
||||||
|
between the "!" and "=": "variable! = value"
|
||||||
|
|
||||||
|
* New feature: "::=" simple assignment operator as defined by POSIX in 2012.
|
||||||
|
This operator has identical functionality to ":=" in GNU make, but will be
|
||||||
|
portable to any implementation of make conforming to a sufficiently new
|
||||||
|
version of POSIX (see http://austingroupbugs.net/view.php?id=330). It is
|
||||||
|
not necessary to define the .POSIX target to access this operator.
|
||||||
|
|
||||||
|
* New feature: Loadable objects
|
||||||
|
This version of GNU make contains a "technology preview": the ability to
|
||||||
|
load dynamic objects into the make runtime. These objects can be created by
|
||||||
|
the user and can add extended functionality, usable by makefiles.
|
||||||
|
|
||||||
|
* New function: $(file ...) writes to a file.
|
||||||
|
|
||||||
|
* New variable: $(GNUMAKEFLAGS) will be parsed for make flags, just like
|
||||||
|
MAKEFLAGS is. It can be set in the environment or the makefile, containing
|
||||||
|
GNU make-specific flags to allow your makefile to be portable to other
|
||||||
|
versions of make. Once this variable is parsed, GNU make will set it to the
|
||||||
|
empty string so that flags will not be duplicated on recursion.
|
||||||
|
|
||||||
|
* New variable: `MAKE_HOST' gives the name of the host architecture
|
||||||
|
make was compiled for. This is the same value you see after 'Built for'
|
||||||
|
when running 'make --version'.
|
||||||
|
|
||||||
|
* Behavior of MAKEFLAGS and MFLAGS is more rigorously defined. All simple
|
||||||
|
flags are grouped together in the first word of MAKEFLAGS. No options that
|
||||||
|
accept arguments appear in the first word. If no simple flags are present
|
||||||
|
MAKEFLAGS begins with a space. Flags with both short and long versions
|
||||||
|
always use the short versions in MAKEFLAGS. Flags are listed in
|
||||||
|
alphabetical order using ASCII ordering. MFLAGS never begins with "- ".
|
||||||
|
|
||||||
|
* Setting the -r and -R options in MAKEFLAGS inside a makefile now works as
|
||||||
|
expected, removing all built-in rules and variables, respectively.
|
||||||
|
|
||||||
|
* If a recipe fails, the makefile name and linenumber of the recipe are shown.
|
||||||
|
|
||||||
|
* A .RECIPEPREFIX setting is remembered per-recipe and variables expanded
|
||||||
|
in that recipe also use that recipe prefix setting.
|
||||||
|
|
||||||
|
* In -p output, .RECIPEPREFIX settings are shown and all target-specific
|
||||||
|
variables are output as if in a makefile, instead of as comments.
|
||||||
|
|
||||||
|
* On MS-Windows, recipes that use ".." quoting will no longer force
|
||||||
|
invocation of commands via temporary batch files and stock Windows
|
||||||
|
shells, they will be short-circuited and invoked directly. (In
|
||||||
|
other words, " is no longer a special character for stock Windows
|
||||||
|
shells.) This avoids hitting shell limits for command length when
|
||||||
|
quotes are used, but nothing else in the command requires the shell.
|
||||||
|
This change could potentially mean some minor incompatibilities in
|
||||||
|
behavior when the recipe uses quoted string on shell command lines.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.82 (28 Jul 2010)
|
||||||
|
|
||||||
A complete list of bugs fixed in this version is available here:
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
@@ -18,14 +209,6 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
|
|||||||
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
||||||
standard runtime library.
|
standard runtime library.
|
||||||
|
|
||||||
* WARNING: Future backward-incompatibility!
|
|
||||||
Wildcards are not documented as returning sorted values, but up to and
|
|
||||||
including this release the results have been sorted and some makefiles are
|
|
||||||
apparently depending on that. In the next release of GNU make, for
|
|
||||||
performance reasons, we may remove that sorting. If your makefiles
|
|
||||||
require sorted results from wildcard expansions, use the $(sort ...)
|
|
||||||
function to request it explicitly.
|
|
||||||
|
|
||||||
* WARNING: Backward-incompatibility!
|
* WARNING: Backward-incompatibility!
|
||||||
The POSIX standard for make was changed in the 2008 version in a
|
The POSIX standard for make was changed in the 2008 version in a
|
||||||
fundamentally incompatible way: make is required to invoke the shell as if
|
fundamentally incompatible way: make is required to invoke the shell as if
|
||||||
@@ -41,6 +224,12 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
|
|||||||
be considered out of date, even if they do not exist (previously only
|
be considered out of date, even if they do not exist (previously only
|
||||||
existing targets were provided in $?).
|
existing targets were provided in $?).
|
||||||
|
|
||||||
|
* WARNING: Backward-incompatibility!
|
||||||
|
Wildcards were not documented as returning sorted values, but the results
|
||||||
|
have been sorted up until this release.. If your makefiles require sorted
|
||||||
|
results from wildcard expansions, use the $(sort ...) function to request
|
||||||
|
it explicitly.
|
||||||
|
|
||||||
* WARNING: Backward-incompatibility!
|
* WARNING: Backward-incompatibility!
|
||||||
As a result of parser enhancements, three backward-compatibility issues
|
As a result of parser enhancements, three backward-compatibility issues
|
||||||
exist: first, a prerequisite containing an "=" cannot be escaped with a
|
exist: first, a prerequisite containing an "=" cannot be escaped with a
|
||||||
@@ -114,8 +303,59 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set
|
|||||||
after the variable name, to allow for simple, conditional, or appending
|
after the variable name, to allow for simple, conditional, or appending
|
||||||
multi-line variable assignment.
|
multi-line variable assignment.
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
||||||
|
timestamps of object modules in OLBs. The timestamps were not correctly
|
||||||
|
adjusted to GMT based time, if the local VMS time was using a daylight
|
||||||
|
saving algorithm and if daylight saving was switched off.
|
||||||
|
|
||||||
|
* John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to
|
||||||
|
append output redirection in action lines.
|
||||||
|
|
||||||
|
* Rework of ctrl+c and ctrl+y handling.
|
||||||
|
|
||||||
|
* Fix a problem with cached strings, which showed on case-insensitive file
|
||||||
|
systems.
|
||||||
|
|
||||||
|
* Build fixes for const-ified code in VMS specific sources.
|
||||||
|
|
||||||
|
* A note on appending the redirected output. With this change, a simple
|
||||||
|
mechanism is implemented to make ">>" work in action lines. In VMS
|
||||||
|
there is no simple feature like ">>" to have DCL command or program
|
||||||
|
output redirected and appended to a file. GNU make for VMS already
|
||||||
|
implements the redirection of output. If such a redirection is detected,
|
||||||
|
an ">" on the action line, GNU make creates a DCL command procedure to
|
||||||
|
execute the action and to redirect its output. Based on that, now ">>"
|
||||||
|
is also recognized and a similar but different command procedure is
|
||||||
|
created to implement the append. The main idea here is to create a
|
||||||
|
temporary file which collects the output and which is appended to the
|
||||||
|
wanted output file. Then the temporary file is deleted. This is all done
|
||||||
|
in the command procedure to keep changes in make small and simple. This
|
||||||
|
obviously has some limitations but it seems good enough compared with
|
||||||
|
the current ">" implementation. (And in my opinion, redirection is not
|
||||||
|
really what GNU make has to do.) With this approach, it may happen that
|
||||||
|
the temporary file is not yet appended and is left in SYS$SCRATCH.
|
||||||
|
The temporary file names look like "CMDxxxxx.". Any time the created
|
||||||
|
command procedure can not complete, this happens. Pressing Ctrl+Y to
|
||||||
|
abort make is one case. In case of Ctrl+Y the associated command
|
||||||
|
procedure is left in SYS$SCRATCH as well. Its name is CMDxxxxx.COM.
|
||||||
|
|
||||||
|
* Change in the Ctrl+Y handling. The CtrlY handler now uses $delprc to
|
||||||
|
delete all children. This way also actions with DCL commands will be
|
||||||
|
stopped. As before the CtrlY handler then sends SIGQUIT to itself,
|
||||||
|
which is handled in common code.
|
||||||
|
|
||||||
|
* Change in deleteing temporary command files. Temporary command files
|
||||||
|
are now deleted in the vms child termination handler. That deletes
|
||||||
|
them even if a Ctrl+C was pressed.
|
||||||
|
|
||||||
|
* The behavior of pressing Ctrl+C is not changed. It still has only an
|
||||||
|
effect, after the current action is terminated. If that doesn't happen
|
||||||
|
or takes too long, Ctrl+Y should be used instead.
|
||||||
|
|
||||||
|
|
||||||
Version 3.81
|
Version 3.81 (01 Apr 2006)
|
||||||
|
|
||||||
* GNU make is ported to OS/2.
|
* GNU make is ported to OS/2.
|
||||||
|
|
||||||
@@ -128,8 +368,8 @@ Version 3.81
|
|||||||
any prerequisite that does not exist, even though that prerequisite
|
any prerequisite that does not exist, even though that prerequisite
|
||||||
might have caused the target to rebuild. Starting with the _next_
|
might have caused the target to rebuild. Starting with the _next_
|
||||||
release of GNU make, '$?' will contain all prerequisites that caused
|
release of GNU make, '$?' will contain all prerequisites that caused
|
||||||
the target to be considered out of date. See this Savannah bug:
|
the target to be considered out of date.
|
||||||
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=16051
|
See http://savannah.gnu.org/bugs/?16051
|
||||||
|
|
||||||
* WARNING: Backward-incompatibility!
|
* WARNING: Backward-incompatibility!
|
||||||
GNU make now implements a generic "second expansion" feature on the
|
GNU make now implements a generic "second expansion" feature on the
|
||||||
@@ -238,7 +478,7 @@ Version 3.81
|
|||||||
could be found on the system.
|
could be found on the system.
|
||||||
|
|
||||||
* On VMS there is now support for case-sensitive filesystems such as ODS5.
|
* On VMS there is now support for case-sensitive filesystems such as ODS5.
|
||||||
See the readme.vms file for information.
|
See the README.VMS file for information.
|
||||||
|
|
||||||
* Parallel builds (-jN) no longer require a working Bourne shell on
|
* Parallel builds (-jN) no longer require a working Bourne shell on
|
||||||
Windows platforms. They work even with the stock Windows shells, such
|
Windows platforms. They work even with the stock Windows shells, such
|
||||||
@@ -256,7 +496,7 @@ A complete list of bugs fixed in this version is available here:
|
|||||||
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=103
|
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=103
|
||||||
|
|
||||||
|
|
||||||
Version 3.80
|
Version 3.80 (03 Oct 2002)
|
||||||
|
|
||||||
* A new feature exists: order-only prerequisites. These prerequisites
|
* A new feature exists: order-only prerequisites. These prerequisites
|
||||||
affect the order in which targets are built, but they do not impact
|
affect the order in which targets are built, but they do not impact
|
||||||
@@ -333,12 +573,48 @@ Version 3.80
|
|||||||
|
|
||||||
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
|
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
||||||
|
|
||||||
|
* In makefile.vms avoid name collision for glob and globfree.
|
||||||
|
|
||||||
|
* This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
||||||
|
|
||||||
|
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
||||||
|
by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
||||||
|
GNU Make 3.60 by Mike Moretti.
|
||||||
|
|
||||||
|
It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
||||||
|
tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
||||||
|
versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
||||||
|
seem worth to get it working. There are still some PTRMISMATCH warnings
|
||||||
|
during the compile. Although perl is working on VMS the test scripts
|
||||||
|
don't work. The function $shell is still missing.
|
||||||
|
|
||||||
|
There is a known bug in some of the VMS CRTLs. It is in the shipped
|
||||||
|
versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
||||||
|
available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
||||||
|
shipped with newer VMS versions and all ECO kits after October 1999. It
|
||||||
|
only shows up during the daylight saving time period (DST): stat()
|
||||||
|
returns a modification time 1 hour ahead. This results in GNU make
|
||||||
|
warning messages. For a just created source you will see:
|
||||||
|
|
||||||
|
$ gmake x.exe
|
||||||
|
gmake.exe;1: *** Warning: File 'x.c' has modification time in the future
|
||||||
|
(940582863 > 940579269)
|
||||||
|
cc /obj=x.obj x.c
|
||||||
|
link x.obj /exe=x.exe
|
||||||
|
gmake.exe;1: *** Warning: Clock skew detected. Your build may be
|
||||||
|
incomplete.
|
||||||
|
|
||||||
|
|
||||||
A complete list of bugs fixed in this version is available here:
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
|
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
|
||||||
|
|
||||||
|
|
||||||
Version 3.79.1
|
Version 3.79.1 (23 Jun 2000)
|
||||||
|
|
||||||
* .SECONDARY with no prerequisites now prevents any target from being
|
* .SECONDARY with no prerequisites now prevents any target from being
|
||||||
removed because make thinks it's an intermediate file, not just those
|
removed because make thinks it's an intermediate file, not just those
|
||||||
@@ -347,7 +623,7 @@ Version 3.79.1
|
|||||||
* New configure option --disable-nsec-timestamps, but this was
|
* New configure option --disable-nsec-timestamps, but this was
|
||||||
superseded in later versions by the .LOW_RESOLUTION_TIME pseudo-target.
|
superseded in later versions by the .LOW_RESOLUTION_TIME pseudo-target.
|
||||||
|
|
||||||
Version 3.79
|
Version 3.79 (04 Apr 2000)
|
||||||
|
|
||||||
* GNU make optionally supports internationalization and locales via the
|
* GNU make optionally supports internationalization and locales via the
|
||||||
GNU gettext (or local gettext if suitable) package. See the ABOUT-NLS
|
GNU gettext (or local gettext if suitable) package. See the ABOUT-NLS
|
||||||
@@ -388,9 +664,59 @@ Version 3.79
|
|||||||
returned.
|
returned.
|
||||||
|
|
||||||
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
||||||
See the readme.vms file for more details.
|
See the README.VMS file for more details.
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* Fix a problem with automatically remaking makefiles. GNU make uses an
|
||||||
|
execve to restart itself after a successful remake of the makefile. On
|
||||||
|
UNIX systems execve replaces the running program with a new one and
|
||||||
|
resets all signal handling to the default. On VMS execve creates a child
|
||||||
|
process, signal and exit handlers of the parent are still active, and,
|
||||||
|
unfortunately, corrupt the exit code from the child. Fix in job.c:
|
||||||
|
ignore SIGCHLD.
|
||||||
|
|
||||||
|
* Added some switches to reflect latest features of DECC. Modifications in
|
||||||
|
makefile.vms.
|
||||||
|
|
||||||
|
* Set some definitions to reflect latest features of DECC. Modifications in
|
||||||
|
config.h-vms (which is copied to config.h).
|
||||||
|
|
||||||
|
* Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
||||||
|
Modification in make.h.
|
||||||
|
|
||||||
|
* Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
||||||
|
Compaq c/c++ compilers. Modifications in default.c.
|
||||||
|
|
||||||
|
* Usage of opendir() and friends, suppress file version. Modifications in
|
||||||
|
dir.c.
|
||||||
|
|
||||||
|
* Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
||||||
|
Modifications in job.c.
|
||||||
|
|
||||||
|
* 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:
|
||||||
|
|
||||||
|
.SUFFIXES :
|
||||||
|
.SUFFIXES : .class .java
|
||||||
|
.java.class :
|
||||||
|
javac "$<
|
||||||
|
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. The
|
||||||
|
macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
||||||
|
Modifications in file.c and config.h-vms.
|
||||||
|
|
||||||
|
* Bootstrap make to start building make is still makefile.com, but make
|
||||||
|
needs to be re-made with a make to make a correct version: ignore all
|
||||||
|
possible warnings, delete all objects, rename make.exe to a different
|
||||||
|
name and run it.
|
||||||
|
|
||||||
|
* Made some minor modifications to the bootstrap build makefile.com.
|
||||||
|
|
||||||
Version 3.78
|
Version 3.78 (22 Sep 1999)
|
||||||
|
|
||||||
* Two new functions, $(error ...) and $(warning ...) are available. The
|
* Two new functions, $(error ...) and $(warning ...) are available. The
|
||||||
former will cause make to fail and exit immediately upon expansion of
|
former will cause make to fail and exit immediately upon expansion of
|
||||||
@@ -446,7 +772,7 @@ Version 3.78
|
|||||||
by running "make check" in the distribution. Note that it requires
|
by running "make check" in the distribution. Note that it requires
|
||||||
Perl (either Perl 4 or Perl 5) to run.
|
Perl (either Perl 4 or Perl 5) to run.
|
||||||
|
|
||||||
Version 3.77
|
Version 3.77 (28 Jul 1998)
|
||||||
|
|
||||||
* Implement BSD make's "?=" variable assignment operator. The variable
|
* Implement BSD make's "?=" variable assignment operator. The variable
|
||||||
is assigned the specified value only if that variable is not already
|
is assigned the specified value only if that variable is not already
|
||||||
@@ -491,12 +817,51 @@ Version 3.77
|
|||||||
|
|
||||||
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32),
|
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32),
|
||||||
and to the DOS port from Eli Zaretski (see README.DOS).
|
and to the DOS port from Eli Zaretski (see README.DOS).
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* This is the VMS port of GNU Make.
|
||||||
|
It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
||||||
|
This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
||||||
|
|
||||||
|
* There is first-level support available from proGIS Software, Germany.
|
||||||
|
Visit their web-site at http://www.progis.de to get information
|
||||||
|
about other vms software and forthcoming updates to gnu make.
|
||||||
|
|
||||||
|
* /bin/sh style I/O redirection is supported. You can now write lines like
|
||||||
|
mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
||||||
|
|
||||||
|
* 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 VMS symbols/logicals !
|
||||||
|
|
||||||
|
* Functions for file names are working now. See the GNU Make manual for
|
||||||
|
$(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
||||||
|
supported as arguments.
|
||||||
|
|
||||||
|
* The default rules are set up for GNU C. Building an executable from a
|
||||||
|
single source file is as easy as 'make file.exe'.
|
||||||
|
|
||||||
|
* The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
||||||
|
different VMS systems can now be written by checking $(ARCH) as in
|
||||||
|
ifeq ($(ARCH),ALPHA)
|
||||||
|
$(ECHO) "On the Alpha"
|
||||||
|
else
|
||||||
|
$(ECHO) "On the VAX"
|
||||||
|
endif
|
||||||
|
|
||||||
|
* Command lines of excessive length are correctly broken and written to a
|
||||||
|
batch file in sys$scratch for later execution. There's no limit to the
|
||||||
|
lengths of commands (and no need for .opt files :-) any more.
|
||||||
|
|
||||||
|
* Empty commands are handled correctly and don't end in a new DCL process.
|
||||||
|
|
||||||
Version 3.76.1
|
Version 3.76.1 (19 Sep 1997)
|
||||||
|
|
||||||
* Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
|
* Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
|
||||||
|
|
||||||
Version 3.76
|
Version 3.76 (16 Sep 1997)
|
||||||
|
|
||||||
* GNU make now uses automake to control Makefile.in generation. This
|
* GNU make now uses automake to control Makefile.in generation. This
|
||||||
should make it more consistent with the GNU standards.
|
should make it more consistent with the GNU standards.
|
||||||
@@ -539,9 +904,55 @@ Version 3.76
|
|||||||
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
|
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
|
||||||
Delorie <dj@delorie.com>.
|
Delorie <dj@delorie.com>.
|
||||||
|
|
||||||
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
* VMS-specific changes:
|
||||||
|
|
||||||
Version 3.75
|
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||||
|
|
||||||
|
* The cd command is supported if it's called as $(CD). This invokes
|
||||||
|
the 'builtin_cd' command which changes the directory.
|
||||||
|
Calling 'set def' doesn't do the trick, since a sub-shell is
|
||||||
|
spawned for this command, the directory is changed *in this sub-shell*
|
||||||
|
and the sub-shell ends.
|
||||||
|
|
||||||
|
* Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
||||||
|
didn't care porting the code. If there is enough interest, I'll do it at
|
||||||
|
some later time.
|
||||||
|
|
||||||
|
* The variable $^ separates files with commas instead of spaces (It's the
|
||||||
|
natural thing to do for VMS).
|
||||||
|
|
||||||
|
* See defaults.c for VMS default suffixes and my definitions for default
|
||||||
|
rules and variables.
|
||||||
|
|
||||||
|
* The shell function is not implemented yet.
|
||||||
|
|
||||||
|
* Load average routines haven't been implemented for VMS yet.
|
||||||
|
|
||||||
|
* 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).
|
||||||
|
|
||||||
|
* The default makefiles make looks for are: makefile.vms, gnumakefile,
|
||||||
|
makefile., and gnumakefile. .
|
||||||
|
|
||||||
|
* The stat() function and handling of time stamps in VMS is broken, so I
|
||||||
|
replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
||||||
|
somewhere in the future. Be warned, the time resolution inside make is
|
||||||
|
less than what vms provides. This might be a problem on the faster Alphas.
|
||||||
|
|
||||||
|
* You can use a : in a filename only if you precede it with a backslash ('\').
|
||||||
|
E.g.- hobbes\:[bogas.files]
|
||||||
|
|
||||||
|
* 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).
|
||||||
|
|
||||||
|
* Remote stuff isn't implemented yet.
|
||||||
|
|
||||||
|
* Multiple line DCL commands, such as "if" statements, must be put inside
|
||||||
|
command files. You can run a command file by using \@.
|
||||||
|
|
||||||
|
Version 3.75 (27 Aug 1996)
|
||||||
|
|
||||||
* The directory messages printed by `-w' and implicitly in sub-makes,
|
* The directory messages printed by `-w' and implicitly in sub-makes,
|
||||||
are now omitted if Make runs no commands and has no other messages to print.
|
are now omitted if Make runs no commands and has no other messages to print.
|
||||||
@@ -561,8 +972,16 @@ Version 3.75
|
|||||||
* Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
|
* Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
|
||||||
See README.W32 for details, and direct all Windows-related questions to
|
See README.W32 for details, and direct all Windows-related questions to
|
||||||
<rob_tulloh@tivoli.com>.
|
<rob_tulloh@tivoli.com>.
|
||||||
|
|
||||||
|
* VMS-specific changes:
|
||||||
|
|
||||||
|
* Lots of default settings are adapted for VMS. See default.c.
|
||||||
|
|
||||||
|
* Long command lines are now converted to command files.
|
||||||
|
|
||||||
|
* Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
||||||
|
|
||||||
Version 3.73
|
Version 3.73 (05 Apr 1995)
|
||||||
|
|
||||||
* Converted to use Autoconf version 2, so `configure' has some new options.
|
* Converted to use Autoconf version 2, so `configure' has some new options.
|
||||||
See INSTALL for details.
|
See INSTALL for details.
|
||||||
@@ -570,7 +989,7 @@ Version 3.73
|
|||||||
* You can now send a SIGUSR1 signal to Make to toggle printing of debugging
|
* You can now send a SIGUSR1 signal to Make to toggle printing of debugging
|
||||||
output enabled by -d, at any time during the run.
|
output enabled by -d, at any time during the run.
|
||||||
|
|
||||||
Version 3.72
|
Version 3.72 (04 Nov 1994)
|
||||||
|
|
||||||
* DJ Delorie has ported Make to MS-DOS using the GO32 extender.
|
* DJ Delorie has ported Make to MS-DOS using the GO32 extender.
|
||||||
He is maintaining the DOS port, not the GNU Make maintainer;
|
He is maintaining the DOS port, not the GNU Make maintainer;
|
||||||
@@ -604,7 +1023,7 @@ Version 3.72
|
|||||||
of `.SILENT', then the recipe to update that file will not be printed
|
of `.SILENT', then the recipe to update that file will not be printed
|
||||||
before it is run. (This change was made to conform to POSIX.2.)
|
before it is run. (This change was made to conform to POSIX.2.)
|
||||||
|
|
||||||
Version 3.71
|
Version 3.71 (21 May 1994)
|
||||||
|
|
||||||
* The automatic variables `$(@D)', `$(%D)', `$(*D)', `$(<D)', `$(?D)', and
|
* The automatic variables `$(@D)', `$(%D)', `$(*D)', `$(<D)', `$(?D)', and
|
||||||
`$(^D)' now omit the trailing slash from the directory name. (This change
|
`$(^D)' now omit the trailing slash from the directory name. (This change
|
||||||
@@ -626,7 +1045,7 @@ Version 3.71
|
|||||||
The exit status is 1 only when using -q and some target is not up to date.
|
The exit status is 1 only when using -q and some target is not up to date.
|
||||||
(This change was made to comply with POSIX.2.)
|
(This change was made to comply with POSIX.2.)
|
||||||
|
|
||||||
Version 3.70
|
Version 3.70 (03 Jan 1994)
|
||||||
|
|
||||||
* It is no longer a fatal error to have a NUL character in a makefile.
|
* It is no longer a fatal error to have a NUL character in a makefile.
|
||||||
You should never put a NUL in a makefile because it can have strange
|
You should never put a NUL in a makefile because it can have strange
|
||||||
@@ -637,7 +1056,7 @@ Version 3.70
|
|||||||
makefile name and line number where the `include' appeared, so Emacs's
|
makefile name and line number where the `include' appeared, so Emacs's
|
||||||
C-x ` command takes you there (in case it's a typo you need to fix).
|
C-x ` command takes you there (in case it's a typo you need to fix).
|
||||||
|
|
||||||
Version 3.69
|
Version 3.69 (07 Nov 1993)
|
||||||
|
|
||||||
* Implicit rule search for archive member references is now done in the
|
* Implicit rule search for archive member references is now done in the
|
||||||
opposite order from previous versions: the whole target name `LIB(MEM)'
|
opposite order from previous versions: the whole target name `LIB(MEM)'
|
||||||
@@ -656,7 +1075,7 @@ Version 3.69
|
|||||||
have reversed the change made in version 3.68 because it turned out to
|
have reversed the change made in version 3.68 because it turned out to
|
||||||
cause a paradoxical situation in cases like:
|
cause a paradoxical situation in cases like:
|
||||||
|
|
||||||
export variable = $(shell echo value)
|
export variable = $(shell echo value)
|
||||||
|
|
||||||
When Make attempted to put this variable in the environment for a
|
When Make attempted to put this variable in the environment for a
|
||||||
recipe, it would try expand the value by running the shell command
|
recipe, it would try expand the value by running the shell command
|
||||||
@@ -667,7 +1086,7 @@ Version 3.69
|
|||||||
* The recipe given for `.DEFAULT' is now used for phony targets with no
|
* The recipe given for `.DEFAULT' is now used for phony targets with no
|
||||||
recipe.
|
recipe.
|
||||||
|
|
||||||
Version 3.68
|
Version 3.68 (28 Jul 1993)
|
||||||
|
|
||||||
* You can list several archive member names inside parenthesis:
|
* You can list several archive member names inside parenthesis:
|
||||||
`lib(mem1 mem2 mem3)' is equivalent to `lib(mem1) lib(mem2) lib(mem3)'.
|
`lib(mem1 mem2 mem3)' is equivalent to `lib(mem1) lib(mem2) lib(mem3)'.
|
||||||
@@ -679,8 +1098,8 @@ Version 3.68
|
|||||||
foo.a(b.o) bar.a(c.o) bar.a(d.o)'.
|
foo.a(b.o) bar.a(c.o) bar.a(d.o)'.
|
||||||
|
|
||||||
* A suffix rule `.X.a' now produces two pattern rules:
|
* A suffix rule `.X.a' now produces two pattern rules:
|
||||||
(%.o): %.X # Previous versions produced only this.
|
(%.o): %.X # Previous versions produced only this.
|
||||||
%.a: %.X # Now produces this as well, just like other suffixes.
|
%.a: %.X # Now produces this as well, just like other suffixes.
|
||||||
|
|
||||||
* The new flag `--warn-undefined-variables' says to issue a warning message
|
* The new flag `--warn-undefined-variables' says to issue a warning message
|
||||||
whenever Make expands a reference to an undefined variable.
|
whenever Make expands a reference to an undefined variable.
|
||||||
@@ -693,16 +1112,16 @@ Version 3.68
|
|||||||
to set up variables for them. They used to run with the environment
|
to set up variables for them. They used to run with the environment
|
||||||
that `make' started with.
|
that `make' started with.
|
||||||
|
|
||||||
Version 3.66
|
Version 3.66 (21 May 1993)
|
||||||
|
|
||||||
* `make --version' (or `make -v') now exits immediately after printing
|
* `make --version' (or `make -v') now exits immediately after printing
|
||||||
the version number.
|
the version number.
|
||||||
|
|
||||||
Version 3.65
|
Version 3.65 (09 May 1993)
|
||||||
|
|
||||||
* Make now supports long-named members in `ar' archive files.
|
* Make now supports long-named members in `ar' archive files.
|
||||||
|
|
||||||
Version 3.64
|
Version 3.64 (21 Apr 1993)
|
||||||
|
|
||||||
* Make now supports the `+=' syntax for a variable definition which appends
|
* Make now supports the `+=' syntax for a variable definition which appends
|
||||||
to the variable's previous value. See the section `Appending More Text
|
to the variable's previous value. See the section `Appending More Text
|
||||||
@@ -716,7 +1135,7 @@ Version 3.64
|
|||||||
* The built-in implicit rules now support the alternative extension
|
* The built-in implicit rules now support the alternative extension
|
||||||
`.txinfo' for Texinfo files, just like `.texinfo' and `.texi'.
|
`.txinfo' for Texinfo files, just like `.texinfo' and `.texi'.
|
||||||
|
|
||||||
Version 3.63
|
Version 3.63 (22 Jan 1993)
|
||||||
|
|
||||||
* Make now uses a standard GNU `configure' script. See the new file
|
* Make now uses a standard GNU `configure' script. See the new file
|
||||||
INSTALL for the new (and much simpler) installation procedure.
|
INSTALL for the new (and much simpler) installation procedure.
|
||||||
@@ -750,15 +1169,15 @@ Version 3.63
|
|||||||
no longer automatically put into the environments of the recipe lines that
|
no longer automatically put into the environments of the recipe lines that
|
||||||
Make runs. Instead, only variables specified on the command line or in
|
Make runs. Instead, only variables specified on the command line or in
|
||||||
the environment are exported by default. To export others, use:
|
the environment are exported by default. To export others, use:
|
||||||
export VARIABLE
|
export VARIABLE
|
||||||
or you can define variables with:
|
or you can define variables with:
|
||||||
export VARIABLE = VALUE
|
export VARIABLE = VALUE
|
||||||
or:
|
or:
|
||||||
export VARIABLE := VALUE
|
export VARIABLE := VALUE
|
||||||
You can use just:
|
You can use just:
|
||||||
export
|
export
|
||||||
or:
|
or:
|
||||||
.EXPORT_ALL_VARIABLES:
|
.EXPORT_ALL_VARIABLES:
|
||||||
to get the old behavior. See the node `Variables/Recursion' in the manual
|
to get the old behavior. See the node `Variables/Recursion' in the manual
|
||||||
for a full description.
|
for a full description.
|
||||||
|
|
||||||
@@ -778,9 +1197,9 @@ Version 3.63
|
|||||||
|
|
||||||
* A single `include' directive can now specify more than one makefile to
|
* A single `include' directive can now specify more than one makefile to
|
||||||
include, like this:
|
include, like this:
|
||||||
include file1 file2
|
include file1 file2
|
||||||
You can also use shell file name patterns in an `include' directive:
|
You can also use shell file name patterns in an `include' directive:
|
||||||
include *.mk
|
include *.mk
|
||||||
|
|
||||||
* The default directories to search for included makefiles, and for
|
* The default directories to search for included makefiles, and for
|
||||||
libraries specified with `-lNAME', are now set by configuration.
|
libraries specified with `-lNAME', are now set by configuration.
|
||||||
@@ -916,7 +1335,7 @@ Version 3.49
|
|||||||
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
||||||
|
|
||||||
* Messages indicating failed recipe lines now contain the target name:
|
* Messages indicating failed recipe lines now contain the target name:
|
||||||
make: *** [target] Error 1
|
make: *** [target] Error 1
|
||||||
|
|
||||||
* The `-p' output format has been changed somewhat to look more like
|
* The `-p' output format has been changed somewhat to look more like
|
||||||
makefile rules and to give all information that Make has about files.
|
makefile rules and to give all information that Make has about files.
|
||||||
@@ -1096,9 +1515,8 @@ Version 3.05
|
|||||||
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
This file is part of GNU Make.
|
||||||
2010 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
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
# NOTE: If you have no 'make' program at all to process this makefile,
|
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||||
# run 'build_w32.bat' instead.
|
# run 'build_w32.bat' instead.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -33,9 +32,9 @@ CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug
|
|||||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||||
|
|
||||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
/STACK:0x400000 /INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||||
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /OUT:WinRel/make.exe
|
/STACK:0x400000 /INCREMENTAL:no /OUT:WinRel/make.exe
|
||||||
|
|
||||||
all: config.h subproc Release Debug
|
all: config.h subproc Release Debug
|
||||||
|
|
||||||
@@ -73,6 +72,8 @@ $(OUTDIR):
|
|||||||
|
|
||||||
LIBS = kernel32.lib user32.lib advapi32.lib
|
LIBS = kernel32.lib user32.lib advapi32.lib
|
||||||
|
|
||||||
|
guile = $(OUTDIR)/guile.obj
|
||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
$(OUTDIR)/ar.obj \
|
$(OUTDIR)/ar.obj \
|
||||||
$(OUTDIR)/arscan.obj \
|
$(OUTDIR)/arscan.obj \
|
||||||
@@ -88,8 +89,10 @@ OBJS = \
|
|||||||
$(OUTDIR)/hash.obj \
|
$(OUTDIR)/hash.obj \
|
||||||
$(OUTDIR)/implicit.obj \
|
$(OUTDIR)/implicit.obj \
|
||||||
$(OUTDIR)/job.obj \
|
$(OUTDIR)/job.obj \
|
||||||
|
$(OUTDIR)/load.obj \
|
||||||
$(OUTDIR)/main.obj \
|
$(OUTDIR)/main.obj \
|
||||||
$(OUTDIR)/misc.obj \
|
$(OUTDIR)/misc.obj \
|
||||||
|
$(OUTDIR)/output.obj \
|
||||||
$(OUTDIR)/read.obj \
|
$(OUTDIR)/read.obj \
|
||||||
$(OUTDIR)/remake.obj \
|
$(OUTDIR)/remake.obj \
|
||||||
$(OUTDIR)/remote-stub.obj \
|
$(OUTDIR)/remote-stub.obj \
|
||||||
@@ -102,7 +105,10 @@ OBJS = \
|
|||||||
$(OUTDIR)/glob.obj \
|
$(OUTDIR)/glob.obj \
|
||||||
$(OUTDIR)/fnmatch.obj \
|
$(OUTDIR)/fnmatch.obj \
|
||||||
$(OUTDIR)/dirent.obj \
|
$(OUTDIR)/dirent.obj \
|
||||||
$(OUTDIR)/pathstuff.obj
|
$(OUTDIR)/pathstuff.obj \
|
||||||
|
$(OUTDIR)/posixfcn.obj \
|
||||||
|
$(OUTDIR)/w32os.obj \
|
||||||
|
$(guile)
|
||||||
|
|
||||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||||
$(LINK) @<<
|
$(LINK) @<<
|
||||||
@@ -118,5 +124,9 @@ $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
|||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
$(OUTDIR)/posixfcn.obj : w32/compat/posixfcn.c
|
||||||
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
$(OUTDIR)/w32os.obj : w32/w32os.c
|
||||||
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
|||||||
27
README.Amiga
27
README.Amiga
@@ -11,7 +11,7 @@ GNU make):
|
|||||||
- Can run multi-line statements
|
- Can run multi-line statements
|
||||||
- Allows to use Device-Names in targets:
|
- Allows to use Device-Names in targets:
|
||||||
|
|
||||||
c:make : make.o
|
c:make : make.o
|
||||||
|
|
||||||
is ok. To distinguish between device-names and target : or ::, MAKE
|
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
|
looks for spaces. If there are any around :, it's taken as a target
|
||||||
@@ -19,14 +19,14 @@ GNU make):
|
|||||||
that "make:make.o" tries to create "make.o" on the device "make:".
|
that "make:make.o" tries to create "make.o" on the device "make:".
|
||||||
- Replaces @@ by a newline in any command line:
|
- Replaces @@ by a newline in any command line:
|
||||||
|
|
||||||
if exists make @@\
|
if exists make @@\
|
||||||
delete make.bak quiet @@\
|
delete make.bak quiet @@\
|
||||||
rename make make.bak @@\
|
rename make make.bak @@\
|
||||||
endif @@\
|
endif @@\
|
||||||
$(CC) Link Make.o To make
|
$(CC) Link Make.o To make
|
||||||
|
|
||||||
works. Note that the @@ must stand alone (ie. "make@@\" is illegal).
|
works. Note that the @@ must stand alone (i.e., "make@@\" is illegal).
|
||||||
Also be carefull that there is a space after the "\" (ie, at the
|
Also be careful that there is a space after the "\" (i.e., at the
|
||||||
beginning of the next line).
|
beginning of the next line).
|
||||||
- Can be made resident to save space and time
|
- Can be made resident to save space and time
|
||||||
- Amiga specific wildcards can be used in $(wildcard ...)
|
- Amiga specific wildcards can be used in $(wildcard ...)
|
||||||
@@ -36,17 +36,17 @@ BUGS:
|
|||||||
|
|
||||||
dummy.h : src/*.c
|
dummy.h : src/*.c
|
||||||
|
|
||||||
tries to make dummy.h from "src/*.c" (ie. no wildcard-expansion takes
|
tries to make dummy.h from "src/*.c" (i.e., no wildcard-expansion takes
|
||||||
place). You have to use "$(wildcard src/*.c)" instead.
|
place). You have to use "$(wildcard src/*.c)" instead.
|
||||||
|
|
||||||
COMPILING FROM SCRATCH
|
COMPILING FROM SCRATCH
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
To recompile, you need SAS/C 6.51. make itself is not neccessary, there
|
To recompile, you need SAS/C 6.51. make itself is not necessary, there
|
||||||
is an smakefile.
|
is an smakefile.
|
||||||
|
|
||||||
1. Copy config.ami to config.h
|
1. Copy config.ami to config.h
|
||||||
2. If you use make to compie, copy Makefile.ami to Makefile and
|
2. If you use make to compile, copy Makefile.ami to Makefile and
|
||||||
glob/Makefile.ami to glob/Makefile. Copy make into the current
|
glob/Makefile.ami to glob/Makefile. Copy make into the current
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
@@ -54,15 +54,14 @@ is an smakefile.
|
|||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
Copy make somewhere in your search path (eg. sc:c or sc:bin).
|
Copy make somewhere in your search path (e.g., sc:c or sc:bin).
|
||||||
If you plan to use recursive makes, install make resident:
|
If you plan to use recursive makes, install make resident:
|
||||||
|
|
||||||
Resident make Add
|
Resident make Add
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ New (since 3.74) DOS-specific features:
|
|||||||
1. Supports long filenames when run from DOS box on Windows 9x.
|
1. Supports long filenames when run from DOS box on Windows 9x.
|
||||||
|
|
||||||
2. Supports both stock DOS COMMAND.COM and Unix-style shells
|
2. Supports both stock DOS COMMAND.COM and Unix-style shells
|
||||||
(details in ``Notes'' below).
|
(details in 'Notes' below).
|
||||||
|
|
||||||
3. Supports DOS drive letters in dependencies and pattern rules.
|
3. Supports DOS drive letters in dependencies and pattern rules.
|
||||||
|
|
||||||
4. Better support for DOS-style backslashes in pathnames (but see
|
4. Better support for DOS-style backslashes in pathnames (but see
|
||||||
``Notes'' below).
|
'Notes' below).
|
||||||
|
|
||||||
5. The $(shell) built-in can run arbitrary complex commands,
|
5. The $(shell) built-in can run arbitrary complex commands,
|
||||||
including pipes and redirection, even when COMMAND.COM is your
|
including pipes and redirection, even when COMMAND.COM is your
|
||||||
@@ -55,20 +55,20 @@ To build from sources:
|
|||||||
either DJTAR (which is part of the DJGPP development
|
either DJTAR (which is part of the DJGPP development
|
||||||
environment), or the DJGPP port of GNU Tar.
|
environment), or the DJGPP port of GNU Tar.
|
||||||
|
|
||||||
2. Invoke the `configure.bat' batch file.
|
2. Invoke the 'configure.bat' batch file.
|
||||||
|
|
||||||
If you are building Make in-place, i.e. in the same directory
|
If you are building Make in-place, i.e. in the same directory
|
||||||
where its sources are kept, just type "configure.bat" and press
|
where its sources are kept, just type "configure.bat" and press
|
||||||
[Enter]. Otherwise, you need to supply the path to the source
|
[Enter]. Otherwise, you need to supply the path to the source
|
||||||
directory as an argument to the batch file, like this:
|
directory as an argument to the batch file, like this:
|
||||||
|
|
||||||
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
|
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
|
||||||
|
|
||||||
Note the forward slashes in the source path argument: you MUST
|
Note the forward slashes in the source path argument: you MUST
|
||||||
use them here.
|
use them here.
|
||||||
|
|
||||||
3. If configure.bat doesn't find a working Make, it will suggest to
|
3. If configure.bat doesn't find a working Make, it will suggest to
|
||||||
use the `dosbuild.bat' batch file to build Make. Either do as it
|
use the 'dosbuild.bat' batch file to build Make. Either do as it
|
||||||
suggests or install another Make program (a pre-compiled binary
|
suggests or install another Make program (a pre-compiled binary
|
||||||
should be available from the usual DJGPP sites) and rerun
|
should be available from the usual DJGPP sites) and rerun
|
||||||
configure.bat.
|
configure.bat.
|
||||||
@@ -84,14 +84,14 @@ To build from sources:
|
|||||||
If you are building from outside of the source directory, you
|
If you are building from outside of the source directory, you
|
||||||
need to tell Make where the sources are, like this:
|
need to tell Make where the sources are, like this:
|
||||||
|
|
||||||
make srcdir=c:/djgpp/gnu/make-%VERSION%
|
make srcdir=c:/djgpp/gnu/make-%VERSION%
|
||||||
|
|
||||||
(configure.bat will tell you this when it finishes). You MUST
|
(configure.bat will tell you this when it finishes). You MUST
|
||||||
use a full, not relative, name of the source directory here, or
|
use a full, not relative, name of the source directory here, or
|
||||||
else Make might fail.
|
else Make might fail.
|
||||||
|
|
||||||
6. After Make finishes, if you have a Unix-style shell installed,
|
6. After Make finishes, if you have a Unix-style shell installed,
|
||||||
you can use the `install' target to install the package. You
|
you can use the 'install' target to install the package. You
|
||||||
will also need GNU Fileutils and GNU Sed for this (they should
|
will also need GNU Fileutils and GNU Sed for this (they should
|
||||||
be available from the DJGPP sites).
|
be available from the DJGPP sites).
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ To build from sources:
|
|||||||
area. If you wish to use a different directory, override the
|
area. If you wish to use a different directory, override the
|
||||||
DESTDIR variable when invoking "make install", like this:
|
DESTDIR variable when invoking "make install", like this:
|
||||||
|
|
||||||
make install DESTDIR=c:/other/dir
|
make install DESTDIR=c:/other/dir
|
||||||
|
|
||||||
This causes the make executable to be placed in c:/other/dir/bin,
|
This causes the make executable to be placed in c:/other/dir/bin,
|
||||||
the man pages in c:/other/dir/man, etc.
|
the man pages in c:/other/dir/man, etc.
|
||||||
@@ -107,21 +107,21 @@ To build from sources:
|
|||||||
Without a Unix-style shell, you will have to install programs
|
Without a Unix-style shell, you will have to install programs
|
||||||
and the docs manually. Copy make.exe to a directory on your
|
and the docs manually. Copy make.exe to a directory on your
|
||||||
PATH, make.i* info files to your Info directory, and update the
|
PATH, make.i* info files to your Info directory, and update the
|
||||||
file `dir' in your Info directory by adding the following item
|
file 'dir' in your Info directory by adding the following item
|
||||||
to the main menu:
|
to the main menu:
|
||||||
|
|
||||||
* Make: (make.info). The GNU make utility.
|
* Make: (make.info). The GNU make utility.
|
||||||
|
|
||||||
If you have the `install-info' program (from the GNU Texinfo
|
If you have the 'install-info' program (from the GNU Texinfo
|
||||||
package), it will do that for you if you invoke it like this:
|
package), it will do that for you if you invoke it like this:
|
||||||
|
|
||||||
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
||||||
|
|
||||||
(If your Info directory is other than C:\DJGPP\INFO, change this
|
(If your Info directory is other than C:\DJGPP\INFO, change this
|
||||||
command accordingly.)
|
command accordingly.)
|
||||||
|
|
||||||
7. The `clean' targets also require Unix-style shell, and GNU Sed
|
7. The 'clean' targets also require Unix-style shell, and GNU Sed
|
||||||
and `rm' programs (the latter from Fileutils).
|
and 'rm' programs (the latter from Fileutils).
|
||||||
|
|
||||||
8. To run the test suite, type "make check". This requires a Unix
|
8. To run the test suite, type "make check". This requires a Unix
|
||||||
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
|
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
|
||||||
@@ -144,7 +144,7 @@ Notes:
|
|||||||
|
|
||||||
This port supports both DOS shells (the stock COMMAND.COM and its
|
This port supports both DOS shells (the stock COMMAND.COM and its
|
||||||
4DOS/NDOS replacements), and Unix-style shells (tested with the
|
4DOS/NDOS replacements), and Unix-style shells (tested with the
|
||||||
venerable Stewartson's `ms_sh' 2.3 and the DJGPP port of `bash' by
|
venerable Stewartson's 'ms_sh' 2.3 and the DJGPP port of 'bash' by
|
||||||
Daisuke Aoyama <jack@st.rim.or.jp>).
|
Daisuke Aoyama <jack@st.rim.or.jp>).
|
||||||
|
|
||||||
When the $SHELL variable points to a Unix-style shell, Make
|
When the $SHELL variable points to a Unix-style shell, Make
|
||||||
@@ -166,17 +166,17 @@ Notes:
|
|||||||
redirection and pipes, and shall only call the shell when a
|
redirection and pipes, and shall only call the shell when a
|
||||||
batch file or a command internal to the shell is invoked. (Even
|
batch file or a command internal to the shell is invoked. (Even
|
||||||
when a command is an internal shell command, Make will first
|
when a command is an internal shell command, Make will first
|
||||||
search the $PATH for it, so that if a Makefile calls `mkdir',
|
search the $PATH for it, so that if a Makefile calls 'mkdir',
|
||||||
you can install, say, a port of GNU `mkdir' and have it called
|
you can install, say, a port of GNU 'mkdir' and have it called
|
||||||
in that case.)
|
in that case.)
|
||||||
|
|
||||||
The key to all this is the extended functionality of `spawn' and
|
The key to all this is the extended functionality of 'spawn' and
|
||||||
`system' functions from the DJGPP library; this port just calls
|
'system' functions from the DJGPP library; this port just calls
|
||||||
`system' where it would invoke the shell on Unix. The most
|
'system' where it would invoke the shell on Unix. The most
|
||||||
important aspect of these functions is that they use a special
|
important aspect of these functions is that they use a special
|
||||||
mechanism to pass long (up to 16KB) command lines to DJGPP
|
mechanism to pass long (up to 16KB) command lines to DJGPP
|
||||||
programs. In addition, `system' emulates some internal
|
programs. In addition, 'system' emulates some internal
|
||||||
commands, like `cd' (so that you can now use forward slashes
|
commands, like 'cd' (so that you can now use forward slashes
|
||||||
with it, and can also change the drive if the directory is on
|
with it, and can also change the drive if the directory is on
|
||||||
another drive). Another aspect worth mentioning is that you can
|
another drive). Another aspect worth mentioning is that you can
|
||||||
call Unix shell scripts directly, provided that the shell whose
|
call Unix shell scripts directly, provided that the shell whose
|
||||||
@@ -186,7 +186,7 @@ Notes:
|
|||||||
reference for more details.
|
reference for more details.
|
||||||
|
|
||||||
The $(shell) built-in is implemented in this port by calling
|
The $(shell) built-in is implemented in this port by calling
|
||||||
`popen'. Since `popen' calls `system', the above considerations
|
'popen'. Since 'popen' calls 'system', the above considerations
|
||||||
are valid for $(shell) as well. In particular, you can put
|
are valid for $(shell) as well. In particular, you can put
|
||||||
arbitrary complex commands, including pipes and redirection,
|
arbitrary complex commands, including pipes and redirection,
|
||||||
inside $(shell), which is in many cases a valid substitute for
|
inside $(shell), which is in many cases a valid substitute for
|
||||||
@@ -197,12 +197,12 @@ Notes:
|
|||||||
|
|
||||||
Many Unix Makefiles include a line which sets the SHELL, for
|
Many Unix Makefiles include a line which sets the SHELL, for
|
||||||
those versions of Make which don't have this as the default.
|
those versions of Make which don't have this as the default.
|
||||||
Since many DOS systems don't have `sh' installed (in fact, most
|
Since many DOS systems don't have 'sh' installed (in fact, most
|
||||||
of them don't even have a `/bin' directory), this port takes
|
of them don't even have a '/bin' directory), this port takes
|
||||||
such directives with a grain of salt. It will only honor such a
|
such directives with a grain of salt. It will only honor such a
|
||||||
directive if the basename of the shell name (like `sh' in the
|
directive if the basename of the shell name (like 'sh' in the
|
||||||
above example) can indeed be found in the directory that is
|
above example) can indeed be found in the directory that is
|
||||||
mentioned in the SHELL= line (`/bin' in the above example), or
|
mentioned in the SHELL= line ('/bin' in the above example), or
|
||||||
in the current working directory, or anywhere on the $PATH (in
|
in the current working directory, or anywhere on the $PATH (in
|
||||||
that order). If the basename doesn't include a filename
|
that order). If the basename doesn't include a filename
|
||||||
extension, Make will look for any known extension that indicates
|
extension, Make will look for any known extension that indicates
|
||||||
@@ -237,8 +237,8 @@ Notes:
|
|||||||
require such a shell). More important, you can convert Unix
|
require such a shell). More important, you can convert Unix
|
||||||
Makefiles to MSDOS and leave the line which sets the shell
|
Makefiles to MSDOS and leave the line which sets the shell
|
||||||
intact, so that people who do have Unixy shell could use it for
|
intact, so that people who do have Unixy shell could use it for
|
||||||
targets which aren't converted to DOS (like `install' and
|
targets which aren't converted to DOS (like 'install' and
|
||||||
`uninstall', for example).
|
'uninstall', for example).
|
||||||
|
|
||||||
|
|
||||||
3. Default directories.
|
3. Default directories.
|
||||||
@@ -258,14 +258,14 @@ Notes:
|
|||||||
If you run Make on Windows 9x, you should be aware of the
|
If you run Make on Windows 9x, you should be aware of the
|
||||||
letter-case issue. Make is internally case-sensitive, but all
|
letter-case issue. Make is internally case-sensitive, but all
|
||||||
file operations are case-insensitive on Windows 9x, so
|
file operations are case-insensitive on Windows 9x, so
|
||||||
e.g. files `FAQ', `faq' and `Faq' all refer to the same file, as
|
e.g. files 'FAQ', 'faq' and 'Faq' all refer to the same file, as
|
||||||
far as Windows is concerned. The underlying DJGPP C library
|
far as Windows is concerned. The underlying DJGPP C library
|
||||||
functions honor the letter-case of the filenames they get from
|
functions honor the letter-case of the filenames they get from
|
||||||
the OS, except that by default, they down-case 8+3 DOS filenames
|
the OS, except that by default, they down-case 8+3 DOS filenames
|
||||||
which are stored in upper case in the directory and would break
|
which are stored in upper case in the directory and would break
|
||||||
many Makefiles otherwise. (The details of which filenames are
|
many Makefiles otherwise. (The details of which filenames are
|
||||||
converted to lower case are explained in the DJGPP libc docs,
|
converted to lower case are explained in the DJGPP libc docs,
|
||||||
under the `_preserve_fncase' and `_lfn_gen_short_fname'
|
under the '_preserve_fncase' and '_lfn_gen_short_fname'
|
||||||
functions, but as a thumb rule, any filename that is stored in
|
functions, but as a thumb rule, any filename that is stored in
|
||||||
upper case in the directory, is a valid DOS 8+3 filename and
|
upper case in the directory, is a valid DOS 8+3 filename and
|
||||||
doesn't include characters invalid on MSDOS FAT filesystems,
|
doesn't include characters invalid on MSDOS FAT filesystems,
|
||||||
@@ -282,8 +282,8 @@ Notes:
|
|||||||
|
|
||||||
There are a lot of places throughout the program sources which
|
There are a lot of places throughout the program sources which
|
||||||
make implicit assumptions about the pathname syntax. In
|
make implicit assumptions about the pathname syntax. In
|
||||||
particular, the directories are assumed to be separated by `/',
|
particular, the directories are assumed to be separated by '/',
|
||||||
and any pathname which doesn't begin with a `/' is assumed to be
|
and any pathname which doesn't begin with a '/' is assumed to be
|
||||||
relative to the current directory. This port attempts to
|
relative to the current directory. This port attempts to
|
||||||
support DOS-style pathnames which might include the drive letter
|
support DOS-style pathnames which might include the drive letter
|
||||||
and use backslashes instead of forward slashes. However, this
|
and use backslashes instead of forward slashes. However, this
|
||||||
@@ -296,7 +296,7 @@ Notes:
|
|||||||
is the standard programs which come with MSDOS. Otherwise, you
|
is the standard programs which come with MSDOS. Otherwise, you
|
||||||
are advised to stay away from backslashes whenever possible. In
|
are advised to stay away from backslashes whenever possible. In
|
||||||
particular, filename globbing won't work on pathnames with
|
particular, filename globbing won't work on pathnames with
|
||||||
backslashes, because the GNU `glob' library doesn't support them
|
backslashes, because the GNU 'glob' library doesn't support them
|
||||||
(backslash is special in filename wildcards, and I didn't want
|
(backslash is special in filename wildcards, and I didn't want
|
||||||
to break that).
|
to break that).
|
||||||
|
|
||||||
@@ -315,17 +315,16 @@ Bug reports:
|
|||||||
<djgpp@delorie.com>, which is an email gateway into the above news
|
<djgpp@delorie.com>, which is an email gateway into the above news
|
||||||
group). For other bugs, please follow the procedure explained in
|
group). For other bugs, please follow the procedure explained in
|
||||||
the "Bugs" chapter of the Info docs. If you don't have an Info
|
the "Bugs" chapter of the Info docs. If you don't have an Info
|
||||||
reader, look up that chapter in the `make.i1' file with any text
|
reader, look up that chapter in the 'make.i1' file with any text
|
||||||
browser/editor.
|
browser/editor.
|
||||||
|
|
||||||
|
|
||||||
Enjoy,
|
Enjoy,
|
||||||
Eli Zaretskii <eliz@is.elta.co.il>
|
Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ 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
|
make not to use drive letters for directory names (i.e. _chdir2() and
|
||||||
_getcwd2() are NOT used). The testsuite interpretes the whole output of
|
_getcwd2() are NOT used). The testsuite interpretes the whole output of
|
||||||
make, especially statements like make[1]: Entering directory
|
make, especially statements like make[1]: Entering directory
|
||||||
`C:/somewhere/make-3.79.1/tests' where the testsuite does not expect the
|
'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
|
drive letter. This would be interpreted as an error even if there is
|
||||||
none.
|
none.
|
||||||
|
|
||||||
@@ -160,8 +160,7 @@ from the make source tree.
|
|||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
Copyright (C) 2003-2016 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
515
README.VMS
Normal file
515
README.VMS
Normal file
@@ -0,0 +1,515 @@
|
|||||||
|
Overview: -*-text-mode-*-
|
||||||
|
---------
|
||||||
|
|
||||||
|
This version of GNU make has been tested on:
|
||||||
|
OpenVMS V8.3/V8.4 (Alpha) and V8.4 (Integrity) AND V7.3 (VAX)
|
||||||
|
|
||||||
|
This version of GNU Make is intended to be run from DCL to run
|
||||||
|
make scripts with a special syntax that is described below. It
|
||||||
|
likely will not be able to run unmodified Unix makefiles.
|
||||||
|
|
||||||
|
There is an older implementation of GNU Make that was ported to GNV.
|
||||||
|
Work is now in progress to merge that port to get a single version
|
||||||
|
of GNU Make available. When that merge is done, GNU Make will auto
|
||||||
|
detect that it is running under a Posix shell and then operate as close to
|
||||||
|
GNU Make on Unix as possible.
|
||||||
|
|
||||||
|
The descriptions below are for running GNU make from DCL or equivalent.
|
||||||
|
|
||||||
|
Recipe differences:
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
GNU Make for OpenVMS can not currently run native Unix make files because of
|
||||||
|
differences in the implementation.
|
||||||
|
|
||||||
|
I am trying to document the current behavior in this section. This is based
|
||||||
|
on the information in the file NEWS. and running the test suite.
|
||||||
|
TODO: More tests are needed to validate and demonstrate the OpenVMS
|
||||||
|
expected behavior.
|
||||||
|
|
||||||
|
In some cases the older behavior of GNU Make when run from DCL is not
|
||||||
|
compatible with standard makefile behavior.
|
||||||
|
|
||||||
|
This behavior can be changed when running GNU Make from DCL by setting
|
||||||
|
either DCL symbols or logical names of the format GNV$. The settings
|
||||||
|
are enabled with a string starting with one of '1', 'T', or 'E' for "1",
|
||||||
|
"TRUE", or "ENABLE". They are disabled with a '0', 'F', or 'D' for "1",
|
||||||
|
"FALSE", or "DISABLE". If they are not explicitly set to one of these
|
||||||
|
values, then they will be set to their default values.
|
||||||
|
|
||||||
|
The value of the setting DECC$FILENAME_UNIX_REPORT or
|
||||||
|
DECC$FILENAME_UNIX_ONLY will now cause the $(dir x) function to return
|
||||||
|
'./' or '[]' as appropriate.
|
||||||
|
|
||||||
|
The name GNV$MAKE_OLD_VMS when enabled will cause GNU Make to behave as
|
||||||
|
much as the older method as can be done with out disabling VMS features.
|
||||||
|
When it is disabled GNU Make have the new behavior which more closely
|
||||||
|
matches Unix Make behavior.
|
||||||
|
|
||||||
|
The default is currently the old behavior when running GNU Make from DCL.
|
||||||
|
In the future this may change. When running make from GNV Bash the new
|
||||||
|
behavior is the default.
|
||||||
|
|
||||||
|
This is a global setting that sets the default behavior for several other
|
||||||
|
options that can be individually changed. Many of the individual settings
|
||||||
|
are to make it so that the self tests for GNU Make need less VMS specific
|
||||||
|
modifications.
|
||||||
|
|
||||||
|
The name GNV$MAKE_COMMA when enabled will cause GNU Make to expect a comma
|
||||||
|
for a path separator and use a comma for the separator for a list of files.
|
||||||
|
When disabled, it will cause GNU Make to use a colon for a path separator
|
||||||
|
and a space for the separator for a list of files. The default is to be
|
||||||
|
enabled if the GNU Make is set to the older behavior.
|
||||||
|
|
||||||
|
The name GNV$MAKE_SHELL_SIM when enabled will cause GNU Make to try to
|
||||||
|
simulate a Posix shell more closely. The following behaviors occur:
|
||||||
|
|
||||||
|
* Single quotes are converted to double quotes and any double
|
||||||
|
quotes inside of them are doubled. No environment variable expansion
|
||||||
|
is simulated.
|
||||||
|
* A exit command status will be converted to a Posix Exit
|
||||||
|
where 0 is success and non-zero is failure.
|
||||||
|
* The $ character will cause environment variable expansion.
|
||||||
|
* Environent variables can be set on the command line before a command.
|
||||||
|
|
||||||
|
VMS generally uses logical name search lists instead of path variables
|
||||||
|
where the resolution is handled by VMS independent of the program. Which
|
||||||
|
means that it is likely that nothing will notice if the default path
|
||||||
|
specifier is changed in the future.
|
||||||
|
|
||||||
|
Currently the built in VMS specific macros and recipes depend on the comma
|
||||||
|
being used as a file list separator.
|
||||||
|
TODO: Remove this dependency as other functions in GNU Make depend on a
|
||||||
|
space being used as a separator.
|
||||||
|
|
||||||
|
The format for recipes are a combination of Unix macros, a subset of
|
||||||
|
simulated UNIX commands, some shell emulation, and OpenVMS commands.
|
||||||
|
This makes the resulting makefiles unique to the OpenVMS port of GNU make.
|
||||||
|
|
||||||
|
If you are creating a OpenVMS specific makefile from scratch, you should also
|
||||||
|
look at MMK (Madgoat Make) available at https://github.com/endlesssoftware/mmk
|
||||||
|
MMK uses full OpenVMS syntax and a persistent subprocess is used for the
|
||||||
|
recipe lines, allowing multiple line rules.
|
||||||
|
|
||||||
|
The default makefile search order is "makefile.vms", "gnumakefile",
|
||||||
|
"makefile". TODO: See if that lookup is case sensitive.
|
||||||
|
|
||||||
|
When Make is invoked from DCL, it will create a foreign command
|
||||||
|
using the name of executable image, with any facility prefix removed,
|
||||||
|
for the duration of the make program, so it can be used internally
|
||||||
|
to recursively run make(). The macro MAKE_COMMAND will be set to
|
||||||
|
this foreign command.
|
||||||
|
|
||||||
|
When make is launched from an exec*() command from a C program,
|
||||||
|
the foreign command is not created. The macro MAKE_COMMAND will be
|
||||||
|
set to the actual command passed as argv[0] to the exec*() function.
|
||||||
|
|
||||||
|
If the DCL symbol or logical name GNV$MAKE_USE_MCR exists, then
|
||||||
|
the macro MAKE_COMMAND will be set to be an "MCR" command with the
|
||||||
|
absolute path used by DCL to launch make. The foreign command
|
||||||
|
will not be created.
|
||||||
|
|
||||||
|
The macro MAKE is set to be the same value as the macro MAKE_COMMAND
|
||||||
|
on all platforms.
|
||||||
|
|
||||||
|
Each recipe command is normally run as a separate spawned processes,
|
||||||
|
except for the cases documented below where a temporary DCL command
|
||||||
|
file may be used.
|
||||||
|
|
||||||
|
BUG: Testing has shown that the commands in the temporary command files
|
||||||
|
are not always created properly. This issue is still under investigation.
|
||||||
|
|
||||||
|
Any macros marked as exported are temporarily created as DCL symbols
|
||||||
|
for child images to use. DCL symbol substitution is not done with these
|
||||||
|
commands.
|
||||||
|
Untested: Symbol substitution.
|
||||||
|
|
||||||
|
When a temporary DCL command file is used, DCL symbol substitution
|
||||||
|
will work.
|
||||||
|
|
||||||
|
For VMS 7.3-1 and earlier, command lines are limited to 255 characters
|
||||||
|
or 1024 characters in a command file.
|
||||||
|
For VMS 7.3-2 and later, command lines are limited to 4059 characters
|
||||||
|
or 8192 characters in a command file.
|
||||||
|
|
||||||
|
VMS limits each token of a command line to 256 characters, and limits
|
||||||
|
a command line to 127 tokens.
|
||||||
|
|
||||||
|
Command lines above the limit length are written to a command file
|
||||||
|
in sys$scratch:.
|
||||||
|
|
||||||
|
In order to handle Unix style extensions to VMS DCL, GNU Make has
|
||||||
|
parsed the recipe commands and them modified them as needed. The
|
||||||
|
parser has been re-written to resolve numerous bugs in handling
|
||||||
|
valid VMS syntax and potential buffer overruns.
|
||||||
|
|
||||||
|
The new parser may need whitespace characters where DCL does not require
|
||||||
|
it, and also may require that quotes are matched were DCL forgives if
|
||||||
|
they are not. There is a small chance that existing VMS specific makefiles
|
||||||
|
will be affected.
|
||||||
|
|
||||||
|
The '<', '>' was previously implemented using command files. Now
|
||||||
|
GNU Make will check to see if the is already a VMS "PIPE" command and
|
||||||
|
if it is not, will convert the command to a VMS "PIPE" command.
|
||||||
|
|
||||||
|
The '>>' redirection has been implemented by using a temporary command file.
|
||||||
|
This will be described later.
|
||||||
|
|
||||||
|
The DCL symbol or logical name GNV$MAKE_USE_CMD_FILE when set to a
|
||||||
|
string starting with one of '1','T', or 'E' for "1", "TRUE", or "ENABLE",
|
||||||
|
then temporary DCL command files are always used for running commands.
|
||||||
|
|
||||||
|
Some recipe strings with embedded new lines will not be handled correctly
|
||||||
|
when a command file is used.
|
||||||
|
|
||||||
|
GNU Make generally does text comparisons for the targets and sources. The
|
||||||
|
make program itself can handle either Unix or OpenVMS format filenames, but
|
||||||
|
normally does not do any conversions from one format to another.
|
||||||
|
TODO: The OpenVMS format syntax handling is incomplete.
|
||||||
|
TODO: ODS-5 EFS support is missing.
|
||||||
|
BUG: The internal routines to convert filenames to and from OpenVMS format
|
||||||
|
do not work correctly.
|
||||||
|
|
||||||
|
Note: In the examples below, line continuations such as a backslash may have
|
||||||
|
been added to make the examples easier to read in this format.
|
||||||
|
BUG: That feature does not completely work at this time.
|
||||||
|
|
||||||
|
Since the OpenVMS utilities generally expect OpenVMS format paths, you will
|
||||||
|
usually have to use OpenVMS format paths for rules and targets.
|
||||||
|
BUG: Relative OpenVMS paths may not work in targets, especially combined
|
||||||
|
with vpaths. This is because GNU make will just concatenate the directories
|
||||||
|
as it does on Unix.
|
||||||
|
|
||||||
|
The variables $^ and $@ separate files with commas instead of spaces.
|
||||||
|
This is controlled by the name GNV$MAKE_COMMA as documented in the
|
||||||
|
previous section.
|
||||||
|
|
||||||
|
While this may seem the natural thing to do with OpenVMS, it actually
|
||||||
|
causes problems when trying to use other make functions that expect the
|
||||||
|
files to be separated by spaces. If you run into this, you need the
|
||||||
|
following workaround to convert the output.
|
||||||
|
TODO: Look at have the $^ and $@ use spaces like on Unix and have
|
||||||
|
and easy to use function to do the conversions and have the built
|
||||||
|
in OpenVMS specific recipes and macros use it.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
comma := ,
|
||||||
|
empty :=
|
||||||
|
space := $(empty) $(empty)
|
||||||
|
|
||||||
|
foo: $(addsuffix .3,$(subs $(comma),$(space),$^)
|
||||||
|
|
||||||
|
|
||||||
|
Makefile variables are looked up in the current environment. You can set
|
||||||
|
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||||
|
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||||
|
override OpenVMS symbols/logicals.
|
||||||
|
|
||||||
|
OpenVMS logical and symbols names show up as "environment" using the
|
||||||
|
origin function. when the "-e" option is specified, the origion function
|
||||||
|
shows them as "environment override". On Posix the test scripts indicate
|
||||||
|
that they should show up just as "environment".
|
||||||
|
|
||||||
|
When GNU make reads in a symbol or logical name into the environment, it
|
||||||
|
converts any dollar signs found to double dollar signs for convenience in
|
||||||
|
using DCL symbols and logical names in recipes. When GNU make exports a
|
||||||
|
DCL symbol for a child process, if the first dollar sign found is followed
|
||||||
|
by second dollar sign, then all double dollar signs will be convirted to
|
||||||
|
single dollar signs.
|
||||||
|
|
||||||
|
The variable $(ARCH) is predefined as IA64, ALPHA or VAX respectively.
|
||||||
|
Makefiles for different OpenVMS systems can now be written by checking
|
||||||
|
$(ARCH). Since IA64 and ALPHA are similar, usually just a check for
|
||||||
|
VAX or not VAX is sufficient.
|
||||||
|
|
||||||
|
You may have to update makefiles that assume VAX if not ALPHA.
|
||||||
|
|
||||||
|
ifeq ($(ARCH),VAX)
|
||||||
|
$(ECHO) "On the VAX"
|
||||||
|
else
|
||||||
|
$(ECHO) "On the ALPHA or IA64"
|
||||||
|
endif
|
||||||
|
|
||||||
|
Empty commands are handled correctly and don't end in a new DCL process.
|
||||||
|
|
||||||
|
The exit command needs to have OpenVMS exit codes. To pass a Posix code
|
||||||
|
back to the make script, you need to encode it by multiplying it by 8
|
||||||
|
and then adding %x1035a002 for a failure code and %x1035a001 for a
|
||||||
|
success. Make will interpret any posix code other than 0 as a failure.
|
||||||
|
TODO: Add an option have simulate Posix exit commands in recipes.
|
||||||
|
|
||||||
|
Lexical functions can be used in pipes to simulate shell file test rules.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Posix:
|
||||||
|
b : c ; [ -f $@ ] || echo >> $@
|
||||||
|
|
||||||
|
OpenVMS:
|
||||||
|
b : c ; if f$$search("$@") then pipe open/append xx $@ ; write xx "" ; close xx
|
||||||
|
|
||||||
|
|
||||||
|
You can also use pipes and turning messages off to silently test for a
|
||||||
|
failure.
|
||||||
|
|
||||||
|
x = %x1035a00a
|
||||||
|
|
||||||
|
%.b : %.c
|
||||||
|
<tab>pipe set mess/nofac/noiden/nosev/notext ; type $^/output=$@ || exit $(x)
|
||||||
|
|
||||||
|
|
||||||
|
Runtime issues:
|
||||||
|
|
||||||
|
The OpenVMS C Runtime has a convention for encoding a Posix exit status into
|
||||||
|
to OpenVMS exit codes. These status codes will have the hex value of
|
||||||
|
0x35a000. OpenVMS exit code may also have a hex value of %x10000000 set on
|
||||||
|
them. This is a flag to tell DCL not to write out the exit code.
|
||||||
|
|
||||||
|
To convert an OpenVMS encoded Posix exit status code to the original code
|
||||||
|
You subtract %x35a000 and any flags from the OpenVMS code and divide it by 8.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility!
|
||||||
|
The make program exit now returns the same encoded Posix exit code as on
|
||||||
|
Unix. Previous versions returned the OpenVMS exit status code if that is what
|
||||||
|
caused the recipe to fail.
|
||||||
|
TODO: Provide a way for scripts calling make to obtain that OpenVMS status
|
||||||
|
code.
|
||||||
|
|
||||||
|
Make internally has two error codes, MAKE_FAILURE and MAKE_TROUBLE. These
|
||||||
|
will have the error "-E-" severity set on exit.
|
||||||
|
|
||||||
|
MAKE_TROUBLE is returned only if the option "-q" or "--question" is used and
|
||||||
|
has a Posix value of 1 and an OpenVMS status of %x1035a00a.
|
||||||
|
|
||||||
|
MAKE_FAILURE has a Posix value of 2 and an OpenVMS status of %x1035a012.
|
||||||
|
|
||||||
|
Output from GNU make may have single quotes around some values where on
|
||||||
|
other platforms it does not. Also output that would be in double quotes
|
||||||
|
on some platforms may show up as single quotes on VMS.
|
||||||
|
|
||||||
|
There may be extra blank lines in the output on VMS.
|
||||||
|
https://savannah.gnu.org/bugs/?func=detailitem&item_id=41760
|
||||||
|
|
||||||
|
There may be a "Waiting for unfinished jobs..." show up in the output.
|
||||||
|
|
||||||
|
Error messages generated by Make or Unix utilities may slightly vary from
|
||||||
|
Posix platforms. Typically the case may be different.
|
||||||
|
|
||||||
|
When make deletes files, on posix platforms it writes out 'rm' and the list
|
||||||
|
of files. On VMS, only the files are writen out, one per line.
|
||||||
|
TODO: VMS
|
||||||
|
|
||||||
|
There may be extra leading white space or additional or missing whitespace
|
||||||
|
in the output of recipes.
|
||||||
|
|
||||||
|
GNU Make uses sys$scratch: for the tempfiles that it creates.
|
||||||
|
|
||||||
|
The OpenVMS CRTL library maps /tmp to sys$scratch if the TMP: logical name
|
||||||
|
does not exist. As the CRTL may use both sys$scratch: and /tmp internally,
|
||||||
|
if you define the TMP logical name to be different than SYS$SCRATCH:,
|
||||||
|
you may end up with only some temporary files in TMP: and some in SYS$SCRATCH:
|
||||||
|
|
||||||
|
The default include directory for including other makefiles is
|
||||||
|
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||||
|
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||||
|
TODO: A better default may be desired.
|
||||||
|
|
||||||
|
If the device for a file in a recipe does not exist, on OpenVMS an error
|
||||||
|
message of "stat: <file>: no such device or address" will be output.
|
||||||
|
|
||||||
|
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||||
|
-W-). But it will stop on -E- and -F- errors. (unless you do something
|
||||||
|
to override this in your makefile, or whatever).
|
||||||
|
|
||||||
|
|
||||||
|
Unix compatibilty features:
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
If the command 'echo' is seen, any single quotes on the line will be
|
||||||
|
converted to double quotes.
|
||||||
|
|
||||||
|
The variable $(CD) is implemented as a built in Change Directory
|
||||||
|
command. This invokes the 'builtin_cd' Executing a 'set default'
|
||||||
|
recipe doesn't do the trick, since it only affects the subprocess
|
||||||
|
spawned for that command.
|
||||||
|
|
||||||
|
The 'builtin_cd' is generally expected to be on its own line.
|
||||||
|
The 'builtin_cd' either from the expansion of $(CD) or directly
|
||||||
|
put in a recipe line will be executed before any other commands in
|
||||||
|
that recipe line. DCL parameter substitution will not work for the
|
||||||
|
'builtin_cd' command.
|
||||||
|
|
||||||
|
Putting a 'builtin_cd' in a pipeline or an IF-THEN line should not be
|
||||||
|
done because the 'builtin_cd' is always executed
|
||||||
|
and executed first. The directory change is persistent.
|
||||||
|
|
||||||
|
Unix shell style I/O redirection is supported. You can now write lines like:
|
||||||
|
"<tab>mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt"
|
||||||
|
|
||||||
|
Posix shells have ":" as a null command. These are now handled.
|
||||||
|
https://savannah.gnu.org/bugs/index.php?41761
|
||||||
|
|
||||||
|
A note on appending the redirected output. A simple mechanism is
|
||||||
|
implemented to make ">>" work in action lines. In OpenVMS there is no simple
|
||||||
|
feature like ">>" to have DCL command or program output redirected and
|
||||||
|
appended to a file. GNU make for OpenVMS implements the redirection
|
||||||
|
of ">>" by using a command procedure.
|
||||||
|
|
||||||
|
The current algorithm creates the output file if it does not exist and
|
||||||
|
then uses the DCL open/append to extend it. SYS$OUTPUT is then directed
|
||||||
|
to that file.
|
||||||
|
|
||||||
|
The implementation supports only one redirected append output to a file
|
||||||
|
and that redirection is done before any other commands in that line
|
||||||
|
are executed, so it redirects all output for that command.
|
||||||
|
|
||||||
|
The older implementation wrote the output to a temporary file in
|
||||||
|
in sys$scratch: and then attempted to append the file to the existing file.
|
||||||
|
The temporary file names looked like "CMDxxxxx.". Any time the created
|
||||||
|
command procedure can not complete, this happens. Pressing Ctrl+Y to
|
||||||
|
abort make is one case.
|
||||||
|
|
||||||
|
In case of Ctrl+Y the associated command procedure is left in SYS$SCRATCH:.
|
||||||
|
The command procedures will be named gnv$make_cmd*.com.
|
||||||
|
|
||||||
|
The CtrlY handler now uses $delprc to delete all children. This way also
|
||||||
|
actions with DCL commands will be stopped. As before the CtrlY handler
|
||||||
|
then sends SIGQUIT to itself, which is handled in common code.
|
||||||
|
|
||||||
|
Temporary command files are now deleted in the OpenVMS child termination
|
||||||
|
handler. That deletes them even if a Ctrl+C was pressed.
|
||||||
|
TODO: Does the previous section about >> leaving files still apply?
|
||||||
|
|
||||||
|
The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
||||||
|
after the current action is terminated. If that doesn't happen or takes too
|
||||||
|
long, Ctrl+Y should be used instead.
|
||||||
|
|
||||||
|
|
||||||
|
Build Options:
|
||||||
|
|
||||||
|
Added support to have case sensitive targets and dependencies but to
|
||||||
|
still use case blind file names. This is especially useful for Java
|
||||||
|
makefiles on VMS:
|
||||||
|
|
||||||
|
<TAB>.SUFFIXES :
|
||||||
|
<TAB>.SUFFIXES : .class .java
|
||||||
|
<TAB>.java.class :
|
||||||
|
<TAB><TAB>javac "$<"
|
||||||
|
<TAB>HelloWorld.class : HelloWorld.java
|
||||||
|
|
||||||
|
A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||||
|
It needs to be enabled to get this feature; default is disabled.
|
||||||
|
TODO: This should be a run-time setting based on if the process
|
||||||
|
has been set to case sensitive.
|
||||||
|
|
||||||
|
|
||||||
|
Unimplemented functionality:
|
||||||
|
|
||||||
|
The new feature "Loadable objects" is not yet supported. If you need it,
|
||||||
|
please send a change request or submit a bug report.
|
||||||
|
|
||||||
|
The new option --output-sync (-O) is accepted but has no effect: GNU make
|
||||||
|
for OpenVMS does not support running multiple commands simultaneously.
|
||||||
|
|
||||||
|
|
||||||
|
Self test failures and todos:
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
The test harness can not handle testing some of the VMS specific modes
|
||||||
|
because of the features needed for to be set for the Perl to run.
|
||||||
|
Need to find a way to set the VMS features before running make as a
|
||||||
|
child.
|
||||||
|
|
||||||
|
GNU make was not currently translating the OpenVMS encoded POSIX values
|
||||||
|
returned to it back to the Posix values. I have temporarily modified the
|
||||||
|
Perl test script to compensate for it. This should be being handled
|
||||||
|
internally to Make.
|
||||||
|
TODO: Verify and update the Perl test script.
|
||||||
|
|
||||||
|
The features/parallelism test was failing. OpenVMS is executing the rules
|
||||||
|
in sequence not in parallel as this feature was not implemented.
|
||||||
|
GNU Make on VMS no longer claims it is implemented.
|
||||||
|
TODO: Implement it.
|
||||||
|
|
||||||
|
Symlink support is not present. Symlinks are supported by OpenVMS 8.3 and
|
||||||
|
later.
|
||||||
|
|
||||||
|
Error messages should be supressed with the "-" at the beginning of a line.
|
||||||
|
On openVMS they were showing up. TODO: Is this still an issue?
|
||||||
|
|
||||||
|
The internal vmsify and unixify OpenVMS to/from UNIX are not handling logical
|
||||||
|
names correctly.
|
||||||
|
|
||||||
|
|
||||||
|
Build instructions:
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Don't use the HP C V7.2-001 compiler, which has an incompatible change
|
||||||
|
how __STDC__ is defined. This results at least in compile time warnings.
|
||||||
|
|
||||||
|
Make a 1st version
|
||||||
|
$ @makefile.com ! ignore any compiler and/or linker warning
|
||||||
|
$ copy make.exe 1st-make.exe
|
||||||
|
|
||||||
|
Use the 1st version to generate a 2nd version as a test.
|
||||||
|
$ mc sys$disk:[]1st-make clean ! ignore any file not found messages
|
||||||
|
$ mc sys$disk:[]1st-make
|
||||||
|
|
||||||
|
Verify your 2nd version by building Make again.
|
||||||
|
$ copy make.exe 2nd-make.exe
|
||||||
|
$ mc sys$disk:[]2nd-make clean
|
||||||
|
$ mc sys$disk:[]2nd-make
|
||||||
|
|
||||||
|
|
||||||
|
Running the tests:
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Running the tests on OpenVMS requires the following software to be installed
|
||||||
|
as most of the tests are Unix oriented.
|
||||||
|
|
||||||
|
* Perl 5.18 or later.
|
||||||
|
https://sourceforge.net/projects/vmsperlkit/files/
|
||||||
|
* GNV 2.1.3 + Updates including a minimum of:
|
||||||
|
* Bash 4.3.30
|
||||||
|
* ld_tools 3.0.2
|
||||||
|
* coreutils 8.21
|
||||||
|
https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/
|
||||||
|
https://sourceforge.net/projects/gnv/files/
|
||||||
|
|
||||||
|
As the test scripts need to create some foreign commands that persist
|
||||||
|
after the test is run, it is recommend that either you use a subprocess or
|
||||||
|
a dedicated login to run the tests.
|
||||||
|
|
||||||
|
To get detailed information for running the tests:
|
||||||
|
|
||||||
|
$ set default [.tests]
|
||||||
|
$ @run_make_tests help
|
||||||
|
|
||||||
|
Running the script with no parameters will run all the tests.
|
||||||
|
|
||||||
|
After the the test script has been run once in a session, assuming
|
||||||
|
that you built make in sys$disk:[make], you can redefined the
|
||||||
|
"bin" logical name as follows:
|
||||||
|
|
||||||
|
$ define bin sys$disk:[make],gnv$gnu:[bin]
|
||||||
|
|
||||||
|
Then you can use Perl to run the scripts.
|
||||||
|
|
||||||
|
$ perl run_make_tests.pl
|
||||||
|
|
||||||
|
|
||||||
|
Acknowlegements:
|
||||||
|
----------------
|
||||||
|
|
||||||
|
See NEWS. for details of past changes.
|
||||||
|
|
||||||
|
These are the currently known contributers to this port.
|
||||||
|
|
||||||
|
Hartmut Becker
|
||||||
|
John Malmberg
|
||||||
|
Michael Gehre
|
||||||
|
John Eisenbraun
|
||||||
|
Klaus Kaempf
|
||||||
|
Mike Moretti
|
||||||
|
John W. Eaton
|
||||||
@@ -1,26 +1,45 @@
|
|||||||
This version of GNU make has been tested on Microsoft Windows 2000/XP/2003.
|
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 has also been used on Windows 95/98/NT, and on OS/2.
|
||||||
|
|
||||||
It builds with the MinGW port of GCC (tested with GCC 3.4.2).
|
It 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, and 2003 as well as
|
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2003, and 14 (2015) as
|
||||||
with .NET 7.x and .NET 2003.
|
well as with .NET 7.x and .NET 2003.
|
||||||
|
|
||||||
The Windows 32-bit port of GNU make is maintained jointly by various
|
As of version 4.0, a build with Guile is supported (tested with Guile
|
||||||
people. It was originally made by Rob Tulloh.
|
2.0.3). To build with Guile, you will need, in addition to Guile
|
||||||
|
itself, its dependency libraries and the pkg-config program. The
|
||||||
|
latter is used to figure out which compilation and link switches and
|
||||||
|
libraries need to be mentioned on the compiler command lines to
|
||||||
|
correctly link with Guile. A Windows port of pkg-config can be found
|
||||||
|
on ezwinports site:
|
||||||
|
|
||||||
|
http://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:
|
Do this first, regardless of the build method you choose:
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
1. At the Windows command prompt run:
|
1. Edit config.h.W32 to your liking (especially the few shell-related
|
||||||
|
|
||||||
if not exist NMakefile copy NMakefile.template NMakefile
|
|
||||||
if not exist config.h copy config.h.W32 config.h
|
|
||||||
|
|
||||||
Then edit config.h to your liking (especially the few shell-related
|
|
||||||
defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
|
defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
|
||||||
to './configure --enable-case-insensitive-file-system').
|
to './configure --enable-case-insensitive-file-system'). (We don't
|
||||||
|
recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
|
||||||
|
consider that if you have a lot of files whose names are in upper
|
||||||
|
case, while Makefile rules are written for lower-case versions.)
|
||||||
|
|
||||||
|
|
||||||
Using make_msvc_net2003.vcproj
|
Using make_msvc_net2003.vcproj
|
||||||
@@ -37,9 +56,17 @@ Building with (MinGW-)GCC using build_w32.bat
|
|||||||
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
|
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
|
||||||
correct PATH and other environment variables for it, then execute ...
|
correct PATH and other environment variables for it, then execute ...
|
||||||
|
|
||||||
build_w32.bat gcc
|
build_w32.bat gcc
|
||||||
|
|
||||||
This produces gnumake.exe in the current directory.
|
This produces gnumake.exe in the GccRel directory.
|
||||||
|
If you want a version of GNU make built with debugging enabled,
|
||||||
|
add the --debug option.
|
||||||
|
|
||||||
|
The batch file will probe for Guile installation, and will build
|
||||||
|
gnumake.exe with Guile if it finds it. If you have Guile
|
||||||
|
installed, but want to build Make without Guile support, type
|
||||||
|
|
||||||
|
build_w32.bat --without-guile gcc
|
||||||
|
|
||||||
|
|
||||||
Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
||||||
@@ -51,16 +78,23 @@ Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
|||||||
e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
|
e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
|
||||||
menue entry from the cl-installation), then execute EITHER ...
|
menue entry from the cl-installation), then execute EITHER ...
|
||||||
|
|
||||||
build_w32.bat
|
build_w32.bat
|
||||||
|
|
||||||
(this produces WinDebug/gnumake.exe and WinRel/gnumake.exe)
|
This produces gnumake.exe in the WinRel directory.
|
||||||
|
If you want a version of GNU make built with debugging enabled,
|
||||||
|
add the --debug option.
|
||||||
|
|
||||||
... OR ...
|
... OR ...
|
||||||
|
|
||||||
nmake /f NMakefile
|
nmake /f NMakefile
|
||||||
|
|
||||||
(this produces WinDebug/make.exe and WinRel/make.exe).
|
(this produces WinDebug/make.exe and WinRel/make.exe).
|
||||||
|
|
||||||
|
The batch file will probe for Guile installation, and will build
|
||||||
|
gnumake.exe with Guile if it finds it. If you have Guile
|
||||||
|
installed, but want to build Make without Guile support, type
|
||||||
|
|
||||||
|
build_w32.bat --without-guile
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
-- Notes/Caveats --
|
-- Notes/Caveats --
|
||||||
@@ -68,212 +102,203 @@ Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
|||||||
|
|
||||||
GNU make on Windows 32-bit platforms:
|
GNU make on Windows 32-bit platforms:
|
||||||
|
|
||||||
This version of make is ported natively to Windows32 platforms
|
This version of make is ported natively to Windows32 platforms
|
||||||
(Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
|
(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
|
Windows 95, and Windows 98). It does not rely on any 3rd party
|
||||||
software or add-on packages for building. The only thing
|
software or add-on packages for building. The only thing
|
||||||
needed is a Windows compiler. Two compilers supported
|
needed is a Windows compiler. Two compilers supported
|
||||||
officially are the MinGW port of GNU GCC, and the various
|
officially are the MinGW port of GNU GCC, and the various
|
||||||
versions of the Microsoft C compiler.
|
versions of the Microsoft C compiler.
|
||||||
|
|
||||||
Do not confuse this port of GNU make with other Windows32 projects
|
Do not confuse this port of GNU make with other Windows32 projects
|
||||||
which provide a GNU make binary. These are separate projects
|
which provide a GNU make binary. These are separate projects
|
||||||
and are not connected to this port effort.
|
and are not connected to this port effort.
|
||||||
|
|
||||||
GNU make and sh.exe:
|
GNU make and sh.exe:
|
||||||
|
|
||||||
This port prefers if you have a working sh.exe somewhere on
|
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
|
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 for launching programs (via a batch file). The
|
||||||
MSDOS mode style execution has not been tested that carefully
|
MSDOS mode style execution has not been tested that carefully
|
||||||
though (The author uses GNU bash as sh.exe).
|
though (The author uses GNU bash as sh.exe).
|
||||||
|
|
||||||
There are very few true ports of Bourne shell for NT right now.
|
There are very few true ports of Bourne shell for NT right now.
|
||||||
There is a version of GNU bash available from Cygnus "Cygwin"
|
There is a version of GNU bash available from Cygnus "Cygwin"
|
||||||
porting effort (http://www.cygwin.com/).
|
porting effort (http://www.cygwin.com/).
|
||||||
Other possibilities are the MKS version of sh.exe, or building
|
Other possibilities are the MKS version of sh.exe, or building
|
||||||
your own with a package like NutCracker (DataFocus) or Portage
|
your own with a package like NutCracker (DataFocus) or Portage
|
||||||
(Consensys). Also MinGW includes sh (http://mingw.org/).
|
(Consensys). Also MinGW includes sh (http://mingw.org/).
|
||||||
|
|
||||||
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
||||||
|
|
||||||
Some versions of Bourne shell do not behave well when invoked
|
Some versions of Bourne shell do not behave well when invoked
|
||||||
as 'sh -c' from CreateProcess(). The main problem is they seem
|
as 'sh -c' from CreateProcess(). The main problem is they seem
|
||||||
to have a hard time handling quoted strings correctly. This can
|
to have a hard time handling quoted strings correctly. This can
|
||||||
be circumvented by writing commands to be executed to a batch
|
be circumvented by writing commands to be executed to a batch
|
||||||
file and then executing the command by calling 'sh file'.
|
file and then executing the command by calling 'sh file'.
|
||||||
|
|
||||||
To work around this difficulty, this version of make supports
|
To work around this difficulty, this version of make supports
|
||||||
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
||||||
time, make forces all command lines to be executed via script
|
time, make forces all command lines to be executed via script
|
||||||
files instead of by command line. In this mode you must have a
|
files instead of by command line. In this mode you must have a
|
||||||
working sh.exe in order to use parallel builds (-j).
|
working sh.exe in order to use parallel builds (-j).
|
||||||
|
|
||||||
A native Windows32 system with no Bourne shell will also run
|
A native Windows32 system with no Bourne shell will also run
|
||||||
in batch mode. All command lines will be put into batch files
|
in batch mode. All command lines will be put into batch files
|
||||||
and executed via $(COMSPEC) (%COMSPEC%). However, parallel
|
and executed via $(COMSPEC) (%COMSPEC%). However, parallel
|
||||||
builds ARE supported with Windows shells (cmd.exe and
|
builds ARE supported with Windows shells (cmd.exe and
|
||||||
command.com). See the next section about some peculiarities
|
command.com). See the next section about some peculiarities
|
||||||
of parallel builds on Windows.
|
of parallel builds on Windows.
|
||||||
|
|
||||||
Support for parallel builds
|
Support for parallel builds
|
||||||
|
|
||||||
Parallel builds (-jN) are supported in this port, with 2
|
Parallel builds (-jN) are supported in this port, with 1
|
||||||
limitations:
|
limitation: The number of concurrent processes has a hard
|
||||||
|
limit of 64, due to the way this port implements waiting for
|
||||||
- The number of concurrent processes has a hard limit of 64,
|
its subprocesses.
|
||||||
due to the way this port implements waiting for its
|
|
||||||
subprocesses;
|
|
||||||
|
|
||||||
- The job server method (available when Make runs on Posix
|
|
||||||
platforms) is not supported, which means you must pass an
|
|
||||||
explicit -jN switch to sub-Make's in a recursive Makefile.
|
|
||||||
If a sub-Make does not receive an explicit -jN switch, it
|
|
||||||
will default to -j1, i.e. no parallelism in sub-Make's.
|
|
||||||
|
|
||||||
GNU make and Cygnus GNU Windows32 tools:
|
GNU make and Cygnus GNU Windows32 tools:
|
||||||
|
|
||||||
Good news! Make now has native support for Cygwin sh. To enable,
|
Good news! Make now has native support for Cygwin sh. To enable,
|
||||||
define the HAVE_CYGWIN_SHELL in config.h and rebuild make
|
define the HAVE_CYGWIN_SHELL in config.h and rebuild make
|
||||||
from scratch. This version of make tested with B20.1 of Cygwin.
|
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.
|
Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
|
||||||
|
|
||||||
GNU make and the MKS shell:
|
GNU make and the MKS shell:
|
||||||
|
|
||||||
There is now semi-official support for the MKS shell. To turn this
|
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
|
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
|
build make. Do not define BATCH_MODE_ONLY_SHELL if you turn
|
||||||
on HAVE_MKS_SHELL.
|
on HAVE_MKS_SHELL.
|
||||||
|
|
||||||
GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
||||||
|
|
||||||
There is a caveat that should be noted with respect to handling
|
There is a caveat that should be noted with respect to handling
|
||||||
single character pathnames on Windows systems. When colon is
|
single character pathnames on Windows systems. When colon is
|
||||||
used in PATH variables, make tries to be smart about knowing when
|
used in PATH variables, make tries to be smart about knowing when
|
||||||
you are using colon as a separator versus colon as a drive
|
you are using colon as a separator versus colon as a drive
|
||||||
letter. Unfortunately, something as simple as the string 'x:/'
|
letter. Unfortunately, something as simple as the string 'x:/'
|
||||||
could be interpreted 2 ways: (x and /) or (x:/).
|
could be interpreted 2 ways: (x and /) or (x:/).
|
||||||
|
|
||||||
Make chooses to interpret a letter plus colon (e.g. x:/) as a
|
Make chooses to interpret a letter plus colon (e.g. x:/) as a
|
||||||
drive letter pathname. If it is necessary to use single
|
drive letter pathname. If it is necessary to use single
|
||||||
character directories in paths (VPATH, vpath, Path, PATH), the
|
character directories in paths (VPATH, vpath, Path, PATH), the
|
||||||
user must do one of two things:
|
user must do one of two things:
|
||||||
|
|
||||||
a. Use semicolon as the separator to disambiguate colon. For
|
a. Use semicolon as the separator to disambiguate colon. For
|
||||||
example use 'x;/' if you want to say 'x' and '/' are
|
example use 'x;/' if you want to say 'x' and '/' are
|
||||||
separate components.
|
separate components.
|
||||||
|
|
||||||
b. Qualify the directory name so that there is more than
|
b. Qualify the directory name so that there is more than
|
||||||
one character in the path(s) used. For example, none
|
one character in the path(s) used. For example, none
|
||||||
of these settings are ambiguous:
|
of these settings are ambiguous:
|
||||||
|
|
||||||
./x:./y
|
./x:./y
|
||||||
/some/path/x:/some/path/y
|
/some/path/x:/some/path/y
|
||||||
x:/some/path/x: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
|
Please note that you are free to mix colon and semi-colon in the
|
||||||
specification of paths. Make is able to figure out the intended
|
specification of paths. Make is able to figure out the intended
|
||||||
result and convert the paths internally to the format needed
|
result and convert the paths internally to the format needed
|
||||||
when interacting with the operating system, providing the path
|
when interacting with the operating system, providing the path
|
||||||
is not within quotes, e.g. "x:/test/test.c".
|
is not within quotes, e.g. "x:/test/test.c".
|
||||||
|
|
||||||
You are encouraged to use colon as the separator character.
|
You are encouraged to use colon as the separator character.
|
||||||
This should ease the pain of deciding how to handle various path
|
This should ease the pain of deciding how to handle various path
|
||||||
problems which exist between platforms. If colon is used on
|
problems which exist between platforms. If colon is used on
|
||||||
both Unix and Windows systems, then no ifdef'ing will be
|
both Unix and Windows systems, then no ifdef'ing will be
|
||||||
necessary in the makefile source.
|
necessary in the makefile source.
|
||||||
|
|
||||||
GNU make test suite:
|
GNU make test suite:
|
||||||
|
|
||||||
I verified all functionality with a slightly modified version
|
I verified all functionality with a slightly modified version
|
||||||
of make-test-%VERSION% (modifications to get test suite to run
|
of make-test-%VERSION% (modifications to get test suite to run
|
||||||
on Windows NT). All tests pass in an environment that includes
|
on Windows NT). All tests pass in an environment that includes
|
||||||
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
||||||
|
|
||||||
Pathnames and white space:
|
Pathnames and white space:
|
||||||
|
|
||||||
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
||||||
contain white space (e.g. C:\Program Files\). These sorts of
|
contain white space (e.g. C:\Program Files\). These sorts of
|
||||||
pathnames are valid on Unix too, but are never encouraged.
|
pathnames are valid on Unix too, but are never encouraged.
|
||||||
There is at least one place in make (VPATH/vpath handling) where
|
There is at least one place in make (VPATH/vpath handling) where
|
||||||
paths containing white space will simply not work. There may be
|
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
|
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
|
that these sorts of paths could be handled. I offer these
|
||||||
suggestions as workarounds:
|
suggestions as workarounds:
|
||||||
|
|
||||||
1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
|
1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
|
||||||
"x:\longpathtest". Type "dir /x" to view these filenames
|
"x:\longpathtest". Type "dir /x" to view these filenames
|
||||||
within the cmd.exe shell.
|
within the cmd.exe shell.
|
||||||
2. Rename the directory so it does not contain white space.
|
2. Rename the directory so it does not contain white space.
|
||||||
|
|
||||||
If you are unhappy with this choice, this is free software
|
If you are unhappy with this choice, this is free software
|
||||||
and you are free to take a crack at making this work. The code
|
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.
|
in w32/pathstuff.c and vpath.c would be the places to start.
|
||||||
|
|
||||||
Pathnames and Case insensitivity:
|
Pathnames and Case insensitivity:
|
||||||
|
|
||||||
Unlike Unix, Windows 95/NT systems are case insensitive but case
|
Unlike Unix, Windows 95/NT systems are case insensitive but case
|
||||||
preserving. For example if you tell the file system to create a
|
preserving. For example if you tell the file system to create a
|
||||||
file named "Target", it will preserve the case. Subsequent access to
|
file named "Target", it will preserve the case. Subsequent access to
|
||||||
the file with other case permutations will succeed (i.e. opening a
|
the file with other case permutations will succeed (i.e. opening a
|
||||||
file named "target" or "TARGET" will open the file "Target").
|
file named "target" or "TARGET" will open the file "Target").
|
||||||
|
|
||||||
By default, GNU make retains its case sensitivity when comparing
|
By default, GNU make retains its case sensitivity when comparing
|
||||||
target names and existing files or directories. It can be
|
target names and existing files or directories. It can be
|
||||||
configured, however, into a case preserving and case insensitive
|
configured, however, into a case preserving and case insensitive
|
||||||
mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
|
mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
|
||||||
config.h.W32.
|
config.h.W32.
|
||||||
|
|
||||||
For example, the following makefile will create a file named
|
For example, the following makefile will create a file named
|
||||||
Target in the directory subdir which will subsequently be used
|
Target in the directory subdir which will subsequently be used
|
||||||
to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
|
to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
|
||||||
Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
|
Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
|
||||||
will not be made:
|
will not be made:
|
||||||
|
|
||||||
subdir/Target:
|
subdir/Target:
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
SUBDIR/DepTarget: SubDir/TARGET
|
SUBDIR/DepTarget: SubDir/TARGET
|
||||||
cp $^ $@
|
cp $^ $@
|
||||||
|
|
||||||
Reliance on this behavior also eliminates the ability of GNU make
|
Reliance on this behavior also eliminates the ability of GNU make
|
||||||
to use case in comparison of matching rules. For example, it is
|
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
|
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
|
than a C rule using %.c. GNU make will consider these to be the
|
||||||
same rule and will issue a warning.
|
same rule and will issue a warning.
|
||||||
|
|
||||||
SAMBA/NTFS/VFAT:
|
SAMBA/NTFS/VFAT:
|
||||||
|
|
||||||
I have not had any success building the debug version of this
|
I have not had any success building the debug version of this
|
||||||
package using SAMBA as my file server. The reason seems to be
|
package using SAMBA as my file server. The reason seems to be
|
||||||
related to the way VC++ 4.0 changes the case name of the pdb
|
related to the way VC++ 4.0 changes the case name of the pdb
|
||||||
filename it is passed on the command line. It seems to change
|
filename it is passed on the command line. It seems to change
|
||||||
the name always to to lower case. I contend that the VC++
|
the name always to to lower case. I contend that the VC++
|
||||||
compiler should not change the casename of files that are passed
|
compiler should not change the casename of files that are passed
|
||||||
as arguments on the command line. I don't think this was a
|
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.
|
problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
|
||||||
|
|
||||||
The package builds fine on VFAT and NTFS filesystems.
|
The package builds fine on VFAT and NTFS filesystems.
|
||||||
|
|
||||||
Most all of the development I have done to date has been using
|
Most all of the development I have done to date has been using
|
||||||
NTFS and long file names. I have not done any considerable work
|
NTFS and long file names. I have not done any considerable work
|
||||||
under VFAT. VFAT users may wish to be aware that this port of
|
under VFAT. VFAT users may wish to be aware that this port of
|
||||||
make does respect case sensitivity.
|
make does respect case sensitivity.
|
||||||
|
|
||||||
FAT:
|
FAT:
|
||||||
|
|
||||||
Version 3.76 added support for FAT filesystems. Make works
|
Version 3.76 added support for FAT filesystems. Make works
|
||||||
around some difficulties with stat'ing of files and caching of
|
around some difficulties with stat'ing of files and caching of
|
||||||
filenames and directories internally.
|
filenames and directories internally.
|
||||||
|
|
||||||
Bug reports:
|
Bug reports:
|
||||||
|
|
||||||
Please submit bugs via the normal bug reporting mechanism which
|
Please submit bugs via the normal bug reporting mechanism which
|
||||||
is described in the GNU make manual and the base README.
|
is described in the GNU make manual and the base README.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -35,19 +35,19 @@ you'll need to re-apply them by hand.
|
|||||||
Install the Customs library and header files according to the
|
Install the Customs library and header files according to the
|
||||||
documentation. You should also install the man pages (contrary to
|
documentation. You should also install the man pages (contrary to
|
||||||
comments in the documentation, they weren't installed automatically for
|
comments in the documentation, they weren't installed automatically for
|
||||||
me; I had to cd to the ``pmake-2.1.33/doc'' directory and run ``pmake
|
me; I had to cd to the 'pmake-2.1.33/doc' directory and run 'pmake
|
||||||
install'' there directly).
|
install' there directly).
|
||||||
|
|
||||||
|
|
||||||
BUILDING GNU MAKE
|
BUILDING GNU MAKE
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Once you've installed Customs, you can build GNU make to use it. When
|
Once you've installed Customs, you can build GNU make to use it. When
|
||||||
configuring GNU make, merely use the ``--with-customs=DIR'' option.
|
configuring GNU make, merely use the '--with-customs=DIR' option.
|
||||||
Provide the directory containing the ``lib'' and ``include/customs''
|
Provide the directory containing the 'lib' and 'include/customs'
|
||||||
subdirectories as DIR. For example, if you installed the customs
|
subdirectories as DIR. For example, if you installed the customs
|
||||||
library in /usr/local/lib and the headers in /usr/local/include/customs,
|
library in /usr/local/lib and the headers in /usr/local/include/customs,
|
||||||
then you'd pass ``--with-customs=/usr/local'' as an option to configure.
|
then you'd pass '--with-customs=/usr/local' as an option to configure.
|
||||||
|
|
||||||
Run make (or use build.sh) normally to build GNU make as described in
|
Run make (or use build.sh) normally to build GNU make as described in
|
||||||
the INSTALL file.
|
the INSTALL file.
|
||||||
@@ -96,8 +96,7 @@ SunOS 4.1.x:
|
|||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
219
README.cvs
219
README.cvs
@@ -1,219 +0,0 @@
|
|||||||
-*-text-*-
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
|
||||||
Software Foundation, Inc. This file is part of GNU Make.
|
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
||||||
terms of the GNU General Public License as published by the Free Software
|
|
||||||
Foundation; either version 3 of the License, or (at your option) any later
|
|
||||||
version.
|
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Obtaining CVS Code
|
|
||||||
------------------
|
|
||||||
|
|
||||||
This seems redundant, since if you're reading this you most likely have
|
|
||||||
already performed this step; however, for completeness, you can obtain
|
|
||||||
the GNU make source code via anonymous CVS from the FSF's Savannah
|
|
||||||
project <http://savannah.gnu.org/projects/make/>:
|
|
||||||
|
|
||||||
$ cvs -d:pserver:anoncvs@cvs.savannah.gnu.org:/sources/make co make
|
|
||||||
|
|
||||||
You might want to use the "-z3" option to get compression, and you most
|
|
||||||
certainly will want the -P option to avoid unneeded directories
|
|
||||||
cluttering up your source. Personally I add these (as well as -dP for
|
|
||||||
update) to my ~/.cvsrc file.
|
|
||||||
|
|
||||||
|
|
||||||
If you have an older version of CVS, you might have to login first.
|
|
||||||
There is no password; just hit the ENTER key if you are asked for one.
|
|
||||||
|
|
||||||
|
|
||||||
Building From CVS
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
To build GNU make from CVS, you will need Autoconf, Automake, and
|
|
||||||
Gettext, and any tools that those utilities require (GNU m4, Perl,
|
|
||||||
etc.). See the configure.in file to find the minimum versions of each
|
|
||||||
of these tools. You will also need a copy of wget.
|
|
||||||
|
|
||||||
When building from CVS you must build in the source directory: "VPATH
|
|
||||||
builds" from remote directories are not supported. Once you've created
|
|
||||||
a distribution, of course, you can unpack it and do a VPATH build from
|
|
||||||
there.
|
|
||||||
|
|
||||||
After checking out the code, you will need to perform these steps to get
|
|
||||||
to the point where you can run "make".
|
|
||||||
|
|
||||||
|
|
||||||
1) $ autoreconf -i
|
|
||||||
|
|
||||||
This rebuilds all the things that need rebuilding, installing
|
|
||||||
missing files as symbolic links.
|
|
||||||
|
|
||||||
You may get warnings here about missing files like README, etc.
|
|
||||||
Ignore them, they are harmless.
|
|
||||||
|
|
||||||
|
|
||||||
2) $ ./configure
|
|
||||||
|
|
||||||
Generate a Makefile
|
|
||||||
|
|
||||||
|
|
||||||
3) $ make update
|
|
||||||
|
|
||||||
Use wget to retrieve various other files that GNU make relies on,
|
|
||||||
but does not keep in its own source tree.
|
|
||||||
|
|
||||||
NB: You may need GNU make to correctly perform this step; if you use
|
|
||||||
a platform-local make you may get problems with missing files in doc/.
|
|
||||||
|
|
||||||
|
|
||||||
At this point you have successfully brought your CVS copy of the GNU
|
|
||||||
make source directory up to the point where it can be treated
|
|
||||||
more-or-less like the official package you would get from ftp.gnu.org.
|
|
||||||
That is, you can just run:
|
|
||||||
|
|
||||||
$ make && make check && make install
|
|
||||||
|
|
||||||
to build and install GNU make.
|
|
||||||
|
|
||||||
|
|
||||||
Windows builds from CVS
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
If you have a UNIX emulation like CYGWIN you can opt to run the general
|
|
||||||
build procedure above; it will work. Be sure to read
|
|
||||||
README.W32.template for information on options you might want to use
|
|
||||||
when running ./configure.
|
|
||||||
|
|
||||||
If you can't or don't want to do that, then rename the file
|
|
||||||
README.W32.template to README.W32 and follow those instructions.
|
|
||||||
|
|
||||||
|
|
||||||
Creating a Package
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Once you have performed the above steps (including the configuration and
|
|
||||||
build) you can create a GNU make package. This is very simple, just
|
|
||||||
run:
|
|
||||||
|
|
||||||
$ make dist-gzip
|
|
||||||
|
|
||||||
and, if you like:
|
|
||||||
|
|
||||||
$ make dist-bzip2
|
|
||||||
|
|
||||||
Even better, you should run this:
|
|
||||||
|
|
||||||
$ make distcheck
|
|
||||||
|
|
||||||
Which will build both .gz and .bz2 package files, then unpack them into
|
|
||||||
a temporary location, try to build them, and repack them, verifying that
|
|
||||||
everything works, you get the same results, _and_ no extraneous files
|
|
||||||
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
|
||||||
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
|
||||||
T. and the AutoToolers!
|
|
||||||
|
|
||||||
|
|
||||||
Steps to Release
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Here are the things that need to be done (in more or less this order)
|
|
||||||
before making an official release:
|
|
||||||
|
|
||||||
* Update the configure.in file with the new release number.
|
|
||||||
* Update the NEWS file with the release number and date.
|
|
||||||
* Create the new release in the Savannah "Bugs" Administration for
|
|
||||||
both the "Component Version" and "Fixed Release" fields.
|
|
||||||
* Create the new release in the Savannah "Patches" Administration for
|
|
||||||
the "Fixed Release" field.
|
|
||||||
* Update the Savannah bug list URL in the NEWS file to use the correct
|
|
||||||
"Fixed Release" ID number.
|
|
||||||
* Run "make distcheck" to be sure it all works.
|
|
||||||
* Commit everything.
|
|
||||||
* cvs tag <RTAG> where RTAG is constructed by replacing each "." in
|
|
||||||
the version with "-" and prefixing it with "make-".
|
|
||||||
|
|
||||||
|
|
||||||
Publishing a Package
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
In order to publish a package on the FSF FTP site, either the release
|
|
||||||
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
|
||||||
first need to have my GPG private key and my passphrase to unlock it.
|
|
||||||
And, you can't have them! So there! But, just so I remember here's
|
|
||||||
what you do:
|
|
||||||
|
|
||||||
Make sure the "Steps to Release" are complete and committed and tagged.
|
|
||||||
|
|
||||||
cvs -d :pserver:anonymous@cvs.savannah.gnu.org:/sources/make \
|
|
||||||
export -r<RTAG> -d make-release make
|
|
||||||
|
|
||||||
cd make-release
|
|
||||||
|
|
||||||
<run the commands above to build the release>
|
|
||||||
|
|
||||||
make upload-alpha # for alpha.gnu.org (pre-releases)
|
|
||||||
-OR-
|
|
||||||
make upload-ftp # for ftp.gnu.org (official releases)
|
|
||||||
|
|
||||||
It will ask for the GPG passphrase _THREE_ times. Sigh.
|
|
||||||
|
|
||||||
|
|
||||||
For both final releases and pre-releases, send an email with the URL of
|
|
||||||
the package to the GNU translation robot to allow the translators to
|
|
||||||
work on it:
|
|
||||||
|
|
||||||
<translation@iro.umontreal.ca>
|
|
||||||
|
|
||||||
|
|
||||||
Where to Announce
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Create the announcement in a text file, then sign it with GPG.
|
|
||||||
|
|
||||||
gpg --clearsign <announcement.txt>
|
|
||||||
|
|
||||||
Upload to gnu.org, then login and send from my account there.
|
|
||||||
|
|
||||||
Email to: make-alpha@gnu.org, bug-make@gnu.org, help-make@gnu.org, make-w32@gnu.org.
|
|
||||||
Email to: info-gnu@gnu.org
|
|
||||||
|
|
||||||
Add a news item to the Savannah project site.
|
|
||||||
|
|
||||||
Add an update to freshmeat.net.
|
|
||||||
|
|
||||||
|
|
||||||
Appendix A - For The Brave
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
For those of you who trust me implicitly, or are just brave (or
|
|
||||||
foolhardy), here is a canned sequence of commands to build a GNU make
|
|
||||||
distribution package from a virgin CVS source checkout (assuming all the
|
|
||||||
prerequisites are available of course).
|
|
||||||
|
|
||||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
|
||||||
swift click o' mouse-2 into an xterm. Go for it!
|
|
||||||
|
|
||||||
autoreconf -i
|
|
||||||
./configure
|
|
||||||
make update
|
|
||||||
make
|
|
||||||
make check
|
|
||||||
|
|
||||||
Or, for a debugging version:
|
|
||||||
|
|
||||||
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
|
||||||
|
|
||||||
Or, all-in-one:
|
|
||||||
|
|
||||||
autoreconf -i && ./configure && make update && make && make check
|
|
||||||
291
README.git
Normal file
291
README.git
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
-*-text-*-
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Obtaining Git Code
|
||||||
|
------------------
|
||||||
|
|
||||||
|
This seems redundant, since if you're reading this you most likely have
|
||||||
|
already performed this step; however, for completeness, you can obtain the GNU
|
||||||
|
make source code via Git from the FSF's Savannah project
|
||||||
|
<http://savannah.gnu.org/projects/make/>:
|
||||||
|
|
||||||
|
$ git clone git://git.savannah.gnu.org/make.git
|
||||||
|
|
||||||
|
|
||||||
|
Changes using Git
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
For non-developers, you can continue to provide patches as before, or if you
|
||||||
|
make a public repository I can pull from that if you prefer.
|
||||||
|
|
||||||
|
Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
|
||||||
|
source control. We use the Gnulib git-to-changelog conversion script to
|
||||||
|
convert the Git comments into ChangeLog-style entries for release. As a
|
||||||
|
result, please format your Git comments carefully so they will look clean
|
||||||
|
after conversion. In particular, each line of your comment will have a TAB
|
||||||
|
added before it so be sure your comment lines are not longer than 72
|
||||||
|
characters; prefer 70 or less. Please use standard ChangeLog formats for
|
||||||
|
your commit messages (sans the leading TAB of course).
|
||||||
|
|
||||||
|
Rule #1: Don't rewrite pushed history (don't use "git push --force").
|
||||||
|
|
||||||
|
Typical simple workflow might be:
|
||||||
|
|
||||||
|
* Edit files
|
||||||
|
* Use "git status" and "git diff" to verify your changes
|
||||||
|
* Use "git add" to stage the changes you want to make
|
||||||
|
* Use "git commit" to commit the staged changes to your local repository
|
||||||
|
* Use "git pull" to accept & merge new changes from the Savannah repository
|
||||||
|
* Use "git push" to push your commits back to the Savannah repository
|
||||||
|
|
||||||
|
For Emacs users, there are many options for Git integration but I strongly
|
||||||
|
recommend the Magit package: http://www.emacswiki.org/emacs/Magit
|
||||||
|
It makes the workflow much clearer, and has advanced features such as
|
||||||
|
constructing multiple commits from various files and even from different
|
||||||
|
diff chunks in the same file. There is a video available which helps a lot.
|
||||||
|
|
||||||
|
|
||||||
|
Coding Standards
|
||||||
|
----------------
|
||||||
|
|
||||||
|
GNU make code adheres to the GNU Coding Standards. Please use only spaces and
|
||||||
|
no TAB characters in source code.
|
||||||
|
|
||||||
|
Additionally, GNU make is a foundational bootstrap package for the GNU
|
||||||
|
project; as such it is very conservative about language features it expects.
|
||||||
|
It should build with any C compiler conforming to the ANSI C89 / ISO C90
|
||||||
|
standard.
|
||||||
|
|
||||||
|
|
||||||
|
Building From Git
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
To build GNU make from Git, you will need Autoconf, Automake, and
|
||||||
|
Gettext, and any tools that those utilities require (GNU m4, Perl,
|
||||||
|
etc.). See the configure.ac file to find the minimum versions of each
|
||||||
|
of these tools. You will also need a copy of wget and gnulib.
|
||||||
|
|
||||||
|
When building from Git you must build in the source directory: "VPATH
|
||||||
|
builds" from remote directories are not supported. Once you've created
|
||||||
|
a distribution, of course, you can unpack it and do a VPATH build from
|
||||||
|
there.
|
||||||
|
|
||||||
|
After checking out the code, you will need to perform these steps to get
|
||||||
|
to the point where you can run "make".
|
||||||
|
|
||||||
|
1) $ autoreconf -i
|
||||||
|
|
||||||
|
This rebuilds all the things that need rebuilding, installing
|
||||||
|
missing files as symbolic links.
|
||||||
|
|
||||||
|
You may get warnings here about missing files like README, etc.
|
||||||
|
Ignore them, they are harmless.
|
||||||
|
|
||||||
|
2) $ ./configure
|
||||||
|
|
||||||
|
Generate a Makefile
|
||||||
|
|
||||||
|
3) $ make update
|
||||||
|
|
||||||
|
Use wget to retrieve various other files that GNU make relies on,
|
||||||
|
but does not keep in its own source tree.
|
||||||
|
|
||||||
|
NB: You may need GNU make to correctly perform this step; if you use
|
||||||
|
a platform-local make you may get problems with missing files in doc/.
|
||||||
|
|
||||||
|
At this point you have successfully brought your Git copy of the GNU
|
||||||
|
make source directory up to the point where it can be treated
|
||||||
|
more-or-less like the official package you would get from ftp.gnu.org.
|
||||||
|
That is, you can just run:
|
||||||
|
|
||||||
|
$ make && make check && make install
|
||||||
|
|
||||||
|
to build and install GNU make.
|
||||||
|
|
||||||
|
|
||||||
|
Windows builds from Git
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
If you have a UNIX emulation like CYGWIN you can opt to run the general
|
||||||
|
build procedure above; it will work. Be sure to read
|
||||||
|
README.W32.template for information on options you might want to use
|
||||||
|
when running ./configure.
|
||||||
|
|
||||||
|
If you can't or don't want to do that, then rename the file
|
||||||
|
README.W32.template to README.W32 and follow those instructions.
|
||||||
|
|
||||||
|
|
||||||
|
Creating a Package
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Once you have performed the above steps (including the configuration and
|
||||||
|
build) you can create a GNU make package. This is very simple, just
|
||||||
|
run:
|
||||||
|
|
||||||
|
$ make dist-gzip
|
||||||
|
|
||||||
|
and, if you like:
|
||||||
|
|
||||||
|
$ make dist-bzip2
|
||||||
|
|
||||||
|
Even better, you should run this:
|
||||||
|
|
||||||
|
$ make distcheck
|
||||||
|
|
||||||
|
Which will build both .gz and .bz2 package files, then unpack them into
|
||||||
|
a temporary location, try to build them, and repack them, verifying that
|
||||||
|
everything works, you get the same results, _and_ no extraneous files
|
||||||
|
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
||||||
|
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
||||||
|
T. and the AutoToolers!
|
||||||
|
|
||||||
|
|
||||||
|
Steps to Release
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Here are the things that need to be done (in more or less this order)
|
||||||
|
before making an official release. If something breaks such that you need to
|
||||||
|
change code, be sure to start over again sufficiently that everything is
|
||||||
|
consistent (that's why we don't finalize the Git tag, etc. until the end).
|
||||||
|
|
||||||
|
* Update the configure.ac file with the new release number.
|
||||||
|
* Update the EDITION value in the doc/make.texi file.
|
||||||
|
* Update the NEWS file with the release number and date.
|
||||||
|
* Ensure the Savannah bug list URL in the NEWS file uses the correct
|
||||||
|
"Fixed Release" ID number.
|
||||||
|
* Run "make distcheck" to be sure it all works.
|
||||||
|
* Run "make check-alt-config" to be sure alternative configurations work
|
||||||
|
* Run "make update-makeweb" to get a copy of the GNU make web pages
|
||||||
|
* Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
|
||||||
|
* Update the web page boilerplate if necessary:
|
||||||
|
../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
|
||||||
|
../gnu-www/www/server/standards/boilerplate.html
|
||||||
|
* Run "make gendocs" (requires gnulib) to generate the manual files for
|
||||||
|
the GNU make web pages.
|
||||||
|
* Follow the directions from gendocs for the web page repository
|
||||||
|
* run "make tag-release" to create a Git tag for the release
|
||||||
|
* Push everything:
|
||||||
|
git push --tags origin master
|
||||||
|
|
||||||
|
Manage the Savannah project for GNU make:
|
||||||
|
|
||||||
|
>>> This is only for real releases, not release candidate builds <<<
|
||||||
|
|
||||||
|
* In Savannah modify the "Value", "Rank", and "Description" values for the
|
||||||
|
current "SCM" entry in both "Component Version" and "Fix Release" fields
|
||||||
|
to refer to the new release. The "Rank" field should be 10 less than the
|
||||||
|
previous release so it orders properly.
|
||||||
|
* In Savannah create a new entry for the "Component Version" and "Fix
|
||||||
|
Release" fields:
|
||||||
|
- Value: SCM
|
||||||
|
- Rank: 20
|
||||||
|
- Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
|
||||||
|
|
||||||
|
- Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
|
||||||
|
|
||||||
|
Start the next release:
|
||||||
|
|
||||||
|
* Update configure.ac and add a ".90" to the release number.
|
||||||
|
* Update the NEWS file with a new section for the release / date.
|
||||||
|
* Update the Savannah URL for the bugs fixed in the NEWS section.
|
||||||
|
|
||||||
|
|
||||||
|
Publishing a Package
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
In order to publish a package on the FSF FTP site, either the release
|
||||||
|
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
||||||
|
first need to have my GPG private key and my passphrase to unlock it.
|
||||||
|
And, you can't have them! So there! But, just so I remember here's
|
||||||
|
what to do:
|
||||||
|
|
||||||
|
Make sure the "Steps to Release" are complete and committed and tagged.
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/make.git make-release
|
||||||
|
|
||||||
|
cd make-release
|
||||||
|
|
||||||
|
<run the commands above to build the release>
|
||||||
|
|
||||||
|
make upload-alpha # for alpha.gnu.org (pre-releases)
|
||||||
|
-OR-
|
||||||
|
make upload-ftp # for ftp.gnu.org (official releases)
|
||||||
|
|
||||||
|
Depending on your distribution (whether GnuPG is integrated with your keyring
|
||||||
|
etc.) it will either pop up a window asking for your GPG key passphrase one
|
||||||
|
time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
|
||||||
|
Sigh.
|
||||||
|
|
||||||
|
|
||||||
|
For both final releases and pre-releases, send an email with the URL of
|
||||||
|
the package to the GNU translation robot to allow the translators to
|
||||||
|
work on it:
|
||||||
|
|
||||||
|
<coordinator@translationproject.org>
|
||||||
|
|
||||||
|
|
||||||
|
Where to Announce
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Create the announcement in a text file, then sign it with GPG.
|
||||||
|
|
||||||
|
gpg --clearsign <announcement.txt>
|
||||||
|
|
||||||
|
Or, use your mail client's PGP/GPG signing capabilities.
|
||||||
|
|
||||||
|
Announce the release:
|
||||||
|
|
||||||
|
* For release candidate builds:
|
||||||
|
To: bug-make@gnu.org
|
||||||
|
CC: coordinator@translationproject.org
|
||||||
|
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||||
|
|
||||||
|
* For release builds
|
||||||
|
To: info-gnu@gnu.org, bug-make@gnu.org
|
||||||
|
CC: coordinator@translationproject.org
|
||||||
|
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||||
|
|
||||||
|
* Add a news item to the Savannah project site.
|
||||||
|
* Add an update to freecode.com (nee freshmeat.net)
|
||||||
|
|
||||||
|
|
||||||
|
Appendix A - For The Brave
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
For those of you who trust me implicitly, or are just brave (or
|
||||||
|
foolhardy), here is a canned sequence of commands to build a GNU make
|
||||||
|
distribution package from a virgin Git source checkout (assuming all the
|
||||||
|
prerequisites are available of course).
|
||||||
|
|
||||||
|
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||||
|
swift click o' mouse-2 into an xterm. Go for it!
|
||||||
|
|
||||||
|
autoreconf -i
|
||||||
|
./configure
|
||||||
|
make update
|
||||||
|
make
|
||||||
|
make check
|
||||||
|
|
||||||
|
Or, for a debugging version:
|
||||||
|
|
||||||
|
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
||||||
|
|
||||||
|
Or, all-in-one:
|
||||||
|
|
||||||
|
autoreconf -i && ./configure && make update && make && make check
|
||||||
@@ -8,20 +8,22 @@ your operating system.
|
|||||||
|
|
||||||
For general building and installation instructions, see the file INSTALL.
|
For general building and installation instructions, see the file INSTALL.
|
||||||
|
|
||||||
If you need to build GNU Make and have no other `make' program to use,
|
If you need to build GNU Make and have no other 'make' program to use,
|
||||||
you can use the shell script `build.sh' instead. To do this, first run
|
you can use the shell script 'build.sh' instead. To do this, first run
|
||||||
`configure' as described in INSTALL. Then, instead of typing `make' to
|
'configure' as described in INSTALL. Then, instead of typing 'make' to
|
||||||
build the program, type `sh build.sh'. This should compile the program
|
build the program, type 'sh build.sh'. This should compile the program
|
||||||
in the current directory. Then you will have a Make program that you can
|
in the current directory. Then you will have a Make program that you can
|
||||||
use for `./make install', or whatever else.
|
use for './make install', or whatever else.
|
||||||
|
|
||||||
Some systems' Make programs are broken and cannot process the Makefile for
|
Some systems' Make programs are broken and cannot process the Makefile for
|
||||||
GNU Make. If you get errors from your system's Make when building GNU
|
GNU Make. If you get errors from your system's Make when building GNU
|
||||||
Make, try using `build.sh' instead.
|
Make, try using 'build.sh' instead.
|
||||||
|
|
||||||
|
|
||||||
GNU Make is free software. See the file COPYING for copying conditions.
|
GNU Make is free software. See the file COPYING for copying conditions.
|
||||||
|
GNU Make is copyright by the Free Software Foundation. Copyright notices
|
||||||
|
condense sequential years into a range; e.g. "1987-1994" means all years
|
||||||
|
from 1987 to 1994 inclusive.
|
||||||
|
|
||||||
Downloading
|
Downloading
|
||||||
-----------
|
-----------
|
||||||
@@ -64,7 +66,7 @@ Bug Reporting
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
|
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
|
||||||
section of the GNU make manual entitled `Problems and Bugs' for
|
section of the GNU make manual entitled 'Problems and Bugs' for
|
||||||
information on submitting useful and complete bug reports.
|
information on submitting useful and complete bug reports.
|
||||||
|
|
||||||
You can also use the online bug tracking system in the Savannah GNU Make
|
You can also use the online bug tracking system in the Savannah GNU Make
|
||||||
@@ -79,31 +81,20 @@ If you need help using GNU make, try these forums:
|
|||||||
news:gnu.utils.help
|
news:gnu.utils.help
|
||||||
news:gnu.utils.bug
|
news:gnu.utils.bug
|
||||||
|
|
||||||
http://savannah.gnu.org/support/?group=make
|
|
||||||
|
|
||||||
You may also find interesting patches to GNU Make available here:
|
Git Access
|
||||||
|
|
||||||
http://savannah.gnu.org/patch/?group=make
|
|
||||||
|
|
||||||
Note these patches are provided by our users as a service and we make no
|
|
||||||
statements regarding their correctness. Please contact the authors
|
|
||||||
directly if you have a problem or suggestion for a patch available on
|
|
||||||
this page.
|
|
||||||
|
|
||||||
|
|
||||||
CVS Access
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The GNU make source repository is available via anonymous CVS from the
|
The GNU make source repository is available via Git from the
|
||||||
GNU Subversions CVS server; look here for details:
|
GNU Savannah Git server; look here for details:
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group=make
|
http://savannah.gnu.org/git/?group=make
|
||||||
|
|
||||||
Please note: you won't be able to build GNU make from CVS without
|
Please note: you won't be able to build GNU make from Git without
|
||||||
installing appropriate maintainer's tools, such as GNU m4, automake,
|
installing appropriate maintainer's tools, such as GNU m4, automake,
|
||||||
autoconf, Perl, GNU make, and GCC. See the README.cvs file for hints on
|
autoconf, Perl, GNU make, and GCC. See the README.git file for hints on
|
||||||
how to build GNU make once these tools are available. We make no
|
how to build GNU make once these tools are available. We make no
|
||||||
guarantees about the contents or quality of the latest code in the CVS
|
guarantees about the contents or quality of the latest code in the Git
|
||||||
repository: it is not unheard of for code that is known to be broken to
|
repository: it is not unheard of for code that is known to be broken to
|
||||||
be checked in. Use at your own risk.
|
be checked in. Use at your own risk.
|
||||||
|
|
||||||
@@ -112,8 +103,8 @@ System-specific Notes
|
|||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
||||||
that if you compile make with `cc -O' on AIX 3.2, it will not work
|
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.
|
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
|
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
|
used to configure GNU make. Please install a different shell such as
|
||||||
@@ -123,15 +114,15 @@ information:
|
|||||||
|
|
||||||
One area that is often a problem in configuration and porting is the code
|
One area that is often a problem in configuration and porting is the code
|
||||||
to check the system's current load average. To make it easier to test and
|
to check the system's current load average. To make it easier to test and
|
||||||
debug this code, you can do `make check-loadavg' to see if it works
|
debug this code, you can do 'make check-loadavg' to see if it works
|
||||||
properly on your system. (You must run `configure' beforehand, but you
|
properly on your system. (You must run 'configure' beforehand, but you
|
||||||
need not build Make itself to run this test.)
|
need not build Make itself to run this test.)
|
||||||
|
|
||||||
Another potential source of porting problems is the support for large
|
Another potential source of porting problems is the support for large
|
||||||
files (LFS) in configure for those operating systems that provide it.
|
files (LFS) in configure for those operating systems that provide it.
|
||||||
Please report any bugs that you find in this area. If you run into
|
Please report any bugs that you find in this area. If you run into
|
||||||
difficulties, then as a workaround you should be able to disable LFS by
|
difficulties, then as a workaround you should be able to disable LFS by
|
||||||
adding the `--disable-largefile' option to the `configure' script.
|
adding the '--disable-largefile' option to the 'configure' script.
|
||||||
|
|
||||||
On systems that support micro- and nano-second timestamp values and
|
On systems that support micro- and nano-second timestamp values and
|
||||||
where stat(2) provides this information, GNU make will use it when
|
where stat(2) provides this information, GNU make will use it when
|
||||||
@@ -151,7 +142,7 @@ Ports
|
|||||||
- See README.customs for details on integrating GNU make with the
|
- See README.customs for details on integrating GNU make with the
|
||||||
Customs distributed build environment from the Pmake distribution.
|
Customs distributed build environment from the Pmake distribution.
|
||||||
|
|
||||||
- See readme.vms for details about GNU Make on OpenVMS.
|
- See README.VMS for details about GNU Make on OpenVMS.
|
||||||
|
|
||||||
- See README.Amiga for details about GNU Make on AmigaDOS.
|
- See README.Amiga for details about GNU Make on AmigaDOS.
|
||||||
|
|
||||||
@@ -171,9 +162,7 @@ at the right README!
|
|||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
# NOTE: If you have no 'make' program at all to process this makefile,
|
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||||
# run 'build.sh' instead.
|
# run 'build.sh' instead.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -26,7 +25,7 @@
|
|||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /make-%VERSION%/
|
VPATH = /make-%VERSION%/
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
# This must repeat the value, because configure will remove 'VPATH = .'.
|
||||||
srcdir = /make-%VERSION%/
|
srcdir = /make-%VERSION%/
|
||||||
|
|
||||||
CC = sc
|
CC = sc
|
||||||
@@ -38,18 +37,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -83,9 +82,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -95,20 +94,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -124,21 +123,26 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
#guile = guile.o
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
|
||||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
|
output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \
|
||||||
|
$(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||||
|
$(srcdir)output.c $(srcdir)output.h \
|
||||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||||
|
|
||||||
|
|
||||||
@@ -148,7 +152,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
|
|||||||
29
TODO.private
29
TODO.private
@@ -6,7 +6,7 @@ This list comes both from the authors and from users of GNU make.
|
|||||||
|
|
||||||
They are listed in no particular order!
|
They are listed in no particular order!
|
||||||
|
|
||||||
Also, I don't gaurantee that all of them will be ultimately deemed "good
|
Also, I don't guarantee that all of them will be ultimately deemed "good
|
||||||
ideas" and implemented. These are just the ones that, at first blush,
|
ideas" and implemented. These are just the ones that, at first blush,
|
||||||
seem to have some merit (and that I can remember).
|
seem to have some merit (and that I can remember).
|
||||||
|
|
||||||
@@ -99,34 +99,9 @@ The Rest of the List
|
|||||||
you just can't figure it out. The way variables are expanded now
|
you just can't figure it out. The way variables are expanded now
|
||||||
means this isn't 100% trivial, but it probably won't be hard.
|
means this isn't 100% trivial, but it probably won't be hard.
|
||||||
|
|
||||||
8) Integration of Guile as an embedded scripting language. This means:
|
|
||||||
allowing Guile functions to be declared in makefiles somehow, then
|
|
||||||
providing a syntax for invoking them. At least one formulation of
|
|
||||||
that would have the function resolve to a string which would be
|
|
||||||
substituted in the makefile, kind of like $(shell ...) does now, but
|
|
||||||
using the embedded interpreter so there's no process forked of
|
|
||||||
course. Obviously this is an optional add-on feature.
|
|
||||||
|
|
||||||
It could be more advanced than that, even, who knows? Maybe make
|
|
||||||
could provide Guile functions that allow Guile scripts more direct
|
|
||||||
access to internal make structures, somehow. This kind of thing
|
|
||||||
needs a lot of thought.
|
|
||||||
|
|
||||||
Also there's always the flip side: in some very fundamental ways
|
|
||||||
make isn't the best choice right now for a complex build tool. It's
|
|
||||||
great for simple-to-medium tasks, but there are already other tools
|
|
||||||
available for the really tough situations. Ask yourself,
|
|
||||||
realistically, how much work is worthwhile to add to make, given the
|
|
||||||
fundamentals you can't really overcome without significantly
|
|
||||||
affecting backward compatibility--and then why not use another tool
|
|
||||||
in the first place?
|
|
||||||
|
|
||||||
Something to think about.
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
19
acinclude.m4
19
acinclude.m4
@@ -1,8 +1,7 @@
|
|||||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||||
dnl
|
dnl
|
||||||
dnl Automake will incorporate this into its generated aclocal.m4.
|
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||||
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
dnl Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
dnl 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
dnl This file is part of GNU Make.
|
dnl This file is part of GNU Make.
|
||||||
dnl
|
dnl
|
||||||
dnl GNU Make is free software; you can redistribute it and/or modify it under
|
dnl GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -100,22 +99,26 @@ changequote([,])dnl
|
|||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl From Paul Eggert <eggert@twinsun.com>
|
dnl From Paul Eggert <eggert@twinsun.com>
|
||||||
|
dnl Update for Darwin by Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
dnl Update for AIX by Olexiy Buyanskyy (Savannah bug 32485)
|
||||||
|
|
||||||
AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
|
AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
|
||||||
[AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim],
|
[AC_CACHE_CHECK([for nanoseconds field of struct stat],
|
||||||
ac_cv_struct_st_mtim_nsec,
|
ac_cv_struct_st_mtim_nsec,
|
||||||
[ac_save_CPPFLAGS="$CPPFLAGS"
|
[ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
ac_cv_struct_st_mtim_nsec=no
|
ac_cv_struct_st_mtim_nsec=no
|
||||||
# tv_nsec -- the usual case
|
# st_mtim.tv_nsec -- the usual case
|
||||||
# _tv_nsec -- Solaris 2.6, if
|
# st_mtim._tv_nsec -- Solaris 2.6, if
|
||||||
# (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
|
# (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
|
||||||
# && !defined __EXTENSIONS__)
|
# && !defined __EXTENSIONS__)
|
||||||
# st__tim.tv_nsec -- UnixWare 2.1.2
|
# st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
|
||||||
for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
|
# st_mtime_n -- AIX 5.2 and above
|
||||||
|
# st_mtimespec.tv_nsec -- Darwin (Mac OSX)
|
||||||
|
for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
|
CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
|
||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
|
], [struct stat s; s.ST_MTIM_NSEC;],
|
||||||
[ac_cv_struct_st_mtim_nsec=$ac_val; break])
|
[ac_cv_struct_st_mtim_nsec=$ac_val; break])
|
||||||
done
|
done
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
|||||||
2
alloca.c
2
alloca.c
@@ -116,7 +116,7 @@ static int stack_dir; /* 1 or -1 once known. */
|
|||||||
static void
|
static void
|
||||||
find_stack_direction (void)
|
find_stack_direction (void)
|
||||||
{
|
{
|
||||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
static char *addr = NULL; /* Address of first 'dummy', once known. */
|
||||||
auto char dummy; /* To get stack address. */
|
auto char dummy; /* To get stack address. */
|
||||||
|
|
||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
|
|||||||
89
amiga.c
89
amiga.c
@@ -1,6 +1,5 @@
|
|||||||
/* Running commands on Amiga
|
/* Running commands on Amiga
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -15,7 +14,7 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "amiga.h"
|
#include "amiga.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -25,7 +24,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
|
|
||||||
static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
|
static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
|
||||||
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
||||||
|
|
||||||
int
|
int
|
||||||
MyExecute (char **argv)
|
MyExecute (char **argv)
|
||||||
@@ -37,53 +36,53 @@ MyExecute (char **argv)
|
|||||||
|
|
||||||
for (aptr=argv; *aptr; aptr++)
|
for (aptr=argv; *aptr; aptr++)
|
||||||
{
|
{
|
||||||
len += strlen (*aptr) + 4;
|
len += strlen (*aptr) + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = AllocMem (len, MEMF_ANY);
|
buffer = AllocMem (len, MEMF_ANY);
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
fatal (NILF, "MyExecute: Cannot allocate space for calling a command");
|
O (fatal, NILF, "MyExecute: Cannot allocate space for calling a command\n");
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
|
|
||||||
for (aptr=argv; *aptr; aptr++)
|
for (aptr=argv; *aptr; aptr++)
|
||||||
{
|
{
|
||||||
if (((*aptr)[0] == ';' && !(*aptr)[1]))
|
if (((*aptr)[0] == ';' && !(*aptr)[1]))
|
||||||
{
|
{
|
||||||
*ptr ++ = '"';
|
*ptr ++ = '"';
|
||||||
strcpy (ptr, *aptr);
|
strcpy (ptr, *aptr);
|
||||||
ptr += strlen (ptr);
|
ptr += strlen (ptr);
|
||||||
*ptr ++ = '"';
|
*ptr ++ = '"';
|
||||||
}
|
}
|
||||||
else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2])
|
else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2])
|
||||||
{
|
{
|
||||||
*ptr ++ = '\n';
|
*ptr ++ = '\n';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy (ptr, *aptr);
|
strcpy (ptr, *aptr);
|
||||||
ptr += strlen (ptr);
|
ptr += strlen (ptr);
|
||||||
}
|
}
|
||||||
*ptr ++ = ' ';
|
*ptr ++ = ' ';
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr[-1] = '\n';
|
ptr[-1] = '\n';
|
||||||
|
|
||||||
status = SystemTags (buffer,
|
status = SystemTags (buffer,
|
||||||
SYS_UserShell, TRUE,
|
SYS_UserShell, TRUE,
|
||||||
TAG_END);
|
TAG_END);
|
||||||
|
|
||||||
FreeMem (buffer, len);
|
FreeMem (buffer, len);
|
||||||
|
|
||||||
if (SetSignal(0L,0L) & SIGBREAKF_CTRL_C)
|
if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)
|
||||||
status = 20;
|
status = 20;
|
||||||
|
|
||||||
/* Warnings don't count */
|
/* Warnings don't count */
|
||||||
if (status == 5)
|
if (status == 5)
|
||||||
status = 0;
|
status = 0;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -91,27 +90,27 @@ MyExecute (char **argv)
|
|||||||
char *
|
char *
|
||||||
wildcard_expansion (char *wc, char *o)
|
wildcard_expansion (char *wc, char *o)
|
||||||
{
|
{
|
||||||
# define PATH_SIZE 1024
|
# define PATH_SIZE 1024
|
||||||
struct AnchorPath * apath;
|
struct AnchorPath * apath;
|
||||||
|
|
||||||
if ( (apath = AllocMem (sizeof (struct AnchorPath) + PATH_SIZE,
|
if ( (apath = AllocMem (sizeof (struct AnchorPath) + PATH_SIZE,
|
||||||
MEMF_CLEAR))
|
MEMF_CLEAR))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
apath->ap_Strlen = PATH_SIZE;
|
apath->ap_Strlen = PATH_SIZE;
|
||||||
|
|
||||||
if (MatchFirst (wc, apath) == 0)
|
if (MatchFirst (wc, apath) == 0)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
o = variable_buffer_output (o, apath->ap_Buf,
|
o = variable_buffer_output (o, apath->ap_Buf,
|
||||||
strlen (apath->ap_Buf));
|
strlen (apath->ap_Buf));
|
||||||
o = variable_buffer_output (o, " ",1);
|
o = variable_buffer_output (o, " ",1);
|
||||||
} while (MatchNext (apath) == 0);
|
} while (MatchNext (apath) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchEnd (apath);
|
MatchEnd (apath);
|
||||||
FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE);
|
FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
|
|||||||
3
amiga.h
3
amiga.h
@@ -1,6 +1,5 @@
|
|||||||
/* Definitions for amiga specific things
|
/* Definitions for amiga specific things
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
111
ar.c
111
ar.c
@@ -1,7 +1,5 @@
|
|||||||
/* Interface to `ar' archives for GNU Make.
|
/* Interface to 'ar' archives for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
@@ -17,18 +15,18 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
/* Return nonzero if NAME is an archive-member reference, zero if not. An
|
/* 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
|
archive-member reference is a name like 'lib(member)' where member is a
|
||||||
non-empty string.
|
non-empty string.
|
||||||
If a name like `lib((entry))' is used, a fatal error is signaled at
|
If a name like 'lib((entry))' is used, a fatal error is signaled at
|
||||||
the attempt to use this unsupported feature. */
|
the attempt to use this unsupported feature. */
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -45,7 +43,7 @@ ar_name (const char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (p[1] == '(' && end[-1] == ')')
|
if (p[1] == '(' && end[-1] == ')')
|
||||||
fatal (NILF, _("attempt to use unsupported feature: `%s'"), name);
|
OS (fatal, NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -63,20 +61,20 @@ ar_parse_name (const char *name, char **arname_p, char **memname_p)
|
|||||||
*arname_p = xstrdup (name);
|
*arname_p = xstrdup (name);
|
||||||
p = strchr (*arname_p, '(');
|
p = strchr (*arname_p, '(');
|
||||||
*(p++) = '\0';
|
*(p++) = '\0';
|
||||||
p[strlen(p) - 1] = '\0';
|
p[strlen (p) - 1] = '\0';
|
||||||
*memname_p = p;
|
*memname_p = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to find which member to look at. */
|
/* This function is called by 'ar_scan' to find which member to look at. */
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static long int
|
static long int
|
||||||
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
long int size UNUSED, long int date,
|
long int size UNUSED, long int date,
|
||||||
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
||||||
const void *name)
|
const void *name)
|
||||||
{
|
{
|
||||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||||
}
|
}
|
||||||
@@ -122,7 +120,7 @@ ar_member_date (const char *name)
|
|||||||
int
|
int
|
||||||
ar_touch (const char *name)
|
ar_touch (const char *name)
|
||||||
{
|
{
|
||||||
error (NILF, _("touch archive member is not available on VMS"));
|
O (error, NILF, _("touch archive member is not available on VMS"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -146,24 +144,24 @@ ar_touch (const char *name)
|
|||||||
switch (ar_member_touch (arname, memname))
|
switch (ar_member_touch (arname, memname))
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
error (NILF, _("touch: Archive `%s' does not exist"), arname);
|
OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
error (NILF, _("touch: `%s' is not a valid archive"), arname);
|
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
perror_with_name ("touch: ", arname);
|
perror_with_name ("touch: ", arname);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
error (NILF,
|
OSS (error, NILF,
|
||||||
_("touch: Member `%s' does not exist in `%s'"), memname, arname);
|
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
val = 0;
|
val = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error (NILF,
|
OS (error, NILF,
|
||||||
_("touch: Bad return code from ar_member_touch on `%s'"), name);
|
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
free (arname);
|
free (arname);
|
||||||
@@ -172,23 +170,33 @@ ar_touch (const char *name)
|
|||||||
}
|
}
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
|
|
||||||
/* State of an `ar_glob' run, passed to `ar_glob_match'. */
|
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
|
||||||
|
|
||||||
|
/* On VMS, (object) modules in libraries do not have suffixes. That is, to
|
||||||
|
find a match for a pattern, the pattern must not have any suffix. So the
|
||||||
|
suffix of the pattern is saved and the pattern is stripped (ar_glob).
|
||||||
|
If there is a match and the match, which is a module name, is added to
|
||||||
|
the chain, the saved suffix is added back to construct a source filename
|
||||||
|
(ar_glob_match). */
|
||||||
|
|
||||||
struct ar_glob_state
|
struct ar_glob_state
|
||||||
{
|
{
|
||||||
const char *arname;
|
const char *arname;
|
||||||
const char *pattern;
|
const char *pattern;
|
||||||
|
#ifdef VMS
|
||||||
|
char *suffix;
|
||||||
|
#endif
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
struct nameseq *chain;
|
struct nameseq *chain;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to match one archive
|
/* This function is called by 'ar_scan' to match one archive
|
||||||
element against the pattern in STATE. */
|
element against the pattern in STATE. */
|
||||||
|
|
||||||
static long int
|
static long int
|
||||||
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
||||||
int gid UNUSED, int mode UNUSED, const void *arg)
|
int gid UNUSED, int mode UNUSED, const void *arg)
|
||||||
{
|
{
|
||||||
@@ -198,7 +206,13 @@ ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
|||||||
{
|
{
|
||||||
/* We have a match. Add it to the chain. */
|
/* We have a match. Add it to the chain. */
|
||||||
struct nameseq *new = xcalloc (state->size);
|
struct nameseq *new = xcalloc (state->size);
|
||||||
new->name = strcache_add (concat (4, state->arname, "(", mem, ")"));
|
#ifdef VMS
|
||||||
|
if (state->suffix)
|
||||||
|
new->name = strcache_add(
|
||||||
|
concat(5, state->arname, "(", mem, state->suffix, ")"));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
|
||||||
new->next = state->chain;
|
new->next = state->chain;
|
||||||
state->chain = new;
|
state->chain = new;
|
||||||
++state->n;
|
++state->n;
|
||||||
@@ -220,21 +234,21 @@ glob_pattern_p (const char *pattern, int quote)
|
|||||||
{
|
{
|
||||||
case '?':
|
case '?':
|
||||||
case '*':
|
case '*':
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case '\\':
|
case '\\':
|
||||||
if (quote)
|
if (quote)
|
||||||
++p;
|
++p;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
opened = 1;
|
opened = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ']':
|
case ']':
|
||||||
if (opened)
|
if (opened)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -250,7 +264,9 @@ ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
|||||||
struct nameseq *n;
|
struct nameseq *n;
|
||||||
const char **names;
|
const char **names;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
#ifdef VMS
|
||||||
|
char *vms_member_pattern;
|
||||||
|
#endif
|
||||||
if (! glob_pattern_p (member_pattern, 1))
|
if (! glob_pattern_p (member_pattern, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -258,11 +274,36 @@ ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
|||||||
ar_glob_match will accumulate them in STATE.chain. */
|
ar_glob_match will accumulate them in STATE.chain. */
|
||||||
state.arname = arname;
|
state.arname = arname;
|
||||||
state.pattern = member_pattern;
|
state.pattern = member_pattern;
|
||||||
|
#ifdef VMS
|
||||||
|
{
|
||||||
|
/* In a copy of the pattern, find the suffix, save it and remove it from
|
||||||
|
the pattern */
|
||||||
|
char *lastdot;
|
||||||
|
vms_member_pattern = xstrdup(member_pattern);
|
||||||
|
lastdot = strrchr(vms_member_pattern, '.');
|
||||||
|
state.suffix = lastdot;
|
||||||
|
if (lastdot)
|
||||||
|
{
|
||||||
|
state.suffix = xstrdup(lastdot);
|
||||||
|
*lastdot = 0;
|
||||||
|
}
|
||||||
|
state.pattern = vms_member_pattern;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
state.size = size;
|
state.size = size;
|
||||||
state.chain = 0;
|
state.chain = 0;
|
||||||
state.n = 0;
|
state.n = 0;
|
||||||
ar_scan (arname, ar_glob_match, &state);
|
ar_scan (arname, ar_glob_match, &state);
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
/* Deallocate any duplicated string */
|
||||||
|
free(vms_member_pattern);
|
||||||
|
if (state.suffix)
|
||||||
|
{
|
||||||
|
free(state.suffix);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (state.chain == 0)
|
if (state.chain == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -284,4 +325,4 @@ ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
|||||||
return state.chain;
|
return state.chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Not NO_ARCHIVES. */
|
#endif /* Not NO_ARCHIVES. */
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shell script to build GNU Make in the absence of any `make' program.
|
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -23,11 +22,11 @@
|
|||||||
|
|
||||||
srcdir='@srcdir@'
|
srcdir='@srcdir@'
|
||||||
CC='@CC@'
|
CC='@CC@'
|
||||||
CFLAGS='@CFLAGS@'
|
CFLAGS='@CFLAGS@ @GUILE_CFLAGS@'
|
||||||
CPPFLAGS='@CPPFLAGS@'
|
CPPFLAGS='@CPPFLAGS@'
|
||||||
LDFLAGS='@LDFLAGS@'
|
LDFLAGS='@AM_LDFLAGS@ @LDFLAGS@'
|
||||||
ALLOCA='@ALLOCA@'
|
ALLOCA='@ALLOCA@'
|
||||||
LOADLIBES='@LIBS@ @LIBINTL@'
|
LOADLIBES='@LIBS@ @GUILE_LIBS@ @LIBINTL@'
|
||||||
eval extras=\'@LIBOBJS@\'
|
eval extras=\'@LIBOBJS@\'
|
||||||
REMOTE='@REMOTE@'
|
REMOTE='@REMOTE@'
|
||||||
GLOBLIB='@GLOBLIB@'
|
GLOBLIB='@GLOBLIB@'
|
||||||
@@ -39,7 +38,7 @@ EXEEXT='@EXEEXT@'
|
|||||||
prefix='@prefix@'
|
prefix='@prefix@'
|
||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix=`eval echo @exec_prefix@`
|
exec_prefix=`eval echo @exec_prefix@`
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
@@ -47,7 +46,7 @@ includedir=${prefix}/include
|
|||||||
localedir=${prefix}/share/locale
|
localedir=${prefix}/share/locale
|
||||||
aliaspath=${localedir}${PATH_SEPARATOR}.
|
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||||
|
|
||||||
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||||
|
|
||||||
# Exit as soon as any command fails.
|
# Exit as soon as any command fails.
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
411
build_w32.bat
Normal file → Executable file
411
build_w32.bat
Normal file → Executable file
@@ -1,6 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
rem Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
rem 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
rem This file is part of GNU Make.
|
rem This file is part of GNU Make.
|
||||||
rem
|
rem
|
||||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -16,188 +15,236 @@ rem
|
|||||||
rem You should have received a copy of the GNU General Public License along
|
rem You should have received a copy of the GNU General Public License along
|
||||||
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if exist config.h.W32 GoTo NotCVS
|
call :Reset
|
||||||
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.in > config.h.W32.sed
|
|
||||||
echo s,%%PACKAGE%%,make,g >> config.h.W32.sed
|
|
||||||
sed -f config.h.W32.sed config.h.W32.template > config.h.W32
|
|
||||||
:NotCVS
|
|
||||||
if not exist config.h copy config.h.W32 config.h
|
|
||||||
cd w32\subproc
|
|
||||||
echo "Creating the subproc library"
|
|
||||||
%ComSpec% /c build.bat %1
|
|
||||||
cd ..\..
|
|
||||||
|
|
||||||
if exist link.dbg del link.dbg
|
if "%1" == "-h" goto Usage
|
||||||
if exist link.rel del link.rel
|
if "%1" == "--help" goto Usage
|
||||||
echo "Creating GNU Make for Windows 9X/NT/2K/XP"
|
|
||||||
if "%1" == "gcc" GoTo GCCBuild
|
set MAKE=gnumake
|
||||||
set make=gnumake
|
set GUILE=Y
|
||||||
|
set COMPILER=msvc
|
||||||
|
|
||||||
|
:ParseSW
|
||||||
|
if "%1" == "--debug" goto SetDebug
|
||||||
|
if "%1" == "--without-guile" goto NoGuile
|
||||||
|
if "%1" == "gcc" goto SetCC
|
||||||
|
if "%1" == "" goto DoneSW
|
||||||
|
|
||||||
|
:SetDebug
|
||||||
|
set DEBUG=Y
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
:NoGuile
|
||||||
|
set GUILE=N
|
||||||
|
echo Building without Guile
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
:SetCC
|
||||||
|
set COMPILER=gcc
|
||||||
|
echo Building with GCC
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
rem Build with Guile is supported only on NT and later versions
|
||||||
|
:DoneSW
|
||||||
|
echo.
|
||||||
|
echo Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8
|
||||||
|
if "%DEBUG%" == "Y" echo Building without compiler optimizations
|
||||||
|
|
||||||
|
if "%COMPILER%" == "gcc" goto GccBuild
|
||||||
|
|
||||||
|
set OUTDIR=.\WinRel
|
||||||
|
set "OPTS=/O2 /D NDEBUG"
|
||||||
|
set LINKOPTS=
|
||||||
|
if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
|
||||||
|
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"
|
||||||
|
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG
|
||||||
|
call :Build
|
||||||
|
goto Done
|
||||||
|
|
||||||
|
:GccBuild
|
||||||
|
set OUTDIR=.\GccRel
|
||||||
|
set OPTS=-O2
|
||||||
|
if "%DEBUG%" == "Y" set OPTS=-O0
|
||||||
|
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
|
||||||
|
call :Build
|
||||||
|
goto Done
|
||||||
|
|
||||||
|
:Done
|
||||||
|
call :Reset
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Build
|
||||||
|
:: Clean the directory if it exists
|
||||||
|
if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
|
||||||
|
|
||||||
|
:: Recreate it
|
||||||
|
mkdir %OUTDIR%
|
||||||
|
mkdir %OUTDIR%\glob
|
||||||
|
mkdir %OUTDIR%\w32
|
||||||
|
mkdir %OUTDIR%\w32\compat
|
||||||
|
mkdir %OUTDIR%\w32\subproc
|
||||||
|
|
||||||
|
if "%GUILE%" == "Y" call :ChkGuile
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Compiling %OUTDIR% version
|
||||||
|
|
||||||
|
if exist config.h.W32.template call :ConfigSCM
|
||||||
|
copy config.h.W32 %OUTDIR%\config.h
|
||||||
|
|
||||||
|
call :Compile ar
|
||||||
|
call :Compile arscan
|
||||||
|
call :Compile commands
|
||||||
|
call :Compile default
|
||||||
|
call :Compile dir
|
||||||
|
call :Compile expand
|
||||||
|
call :Compile file
|
||||||
|
call :Compile function
|
||||||
|
call :Compile getloadavg
|
||||||
|
call :Compile getopt
|
||||||
|
call :Compile getopt1
|
||||||
|
call :Compile glob\fnmatch
|
||||||
|
call :Compile glob\glob
|
||||||
|
call :Compile guile GUILE
|
||||||
|
call :Compile hash
|
||||||
|
call :Compile implicit
|
||||||
|
call :Compile job
|
||||||
|
call :Compile load
|
||||||
|
call :Compile loadapi
|
||||||
|
call :Compile main GUILE
|
||||||
|
call :Compile misc
|
||||||
|
call :Compile output
|
||||||
|
call :Compile read
|
||||||
|
call :Compile remake
|
||||||
|
call :Compile remote-stub
|
||||||
|
call :Compile rule
|
||||||
|
call :Compile signame
|
||||||
|
call :Compile strcache
|
||||||
|
call :Compile variable
|
||||||
|
call :Compile version
|
||||||
|
call :Compile vpath
|
||||||
|
call :Compile w32\compat\posixfcn
|
||||||
|
call :Compile w32\pathstuff
|
||||||
|
call :Compile w32\subproc\misc
|
||||||
|
call :Compile w32\subproc\sub_proc
|
||||||
|
call :Compile w32\subproc\w32err
|
||||||
|
call :Compile w32\w32os
|
||||||
|
|
||||||
|
if not "%COMPILER%" == "gcc" call :Compile w32\compat\dirent
|
||||||
|
|
||||||
|
call :Link
|
||||||
|
|
||||||
|
echo.
|
||||||
|
if not exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build FAILED!
|
||||||
|
if exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build succeeded.
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Compile
|
||||||
|
set EXTRAS=
|
||||||
|
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
||||||
|
if "%COMPILER%" == "gcc" goto GccCompile
|
||||||
|
|
||||||
|
:: MSVC Compile
|
||||||
echo on
|
echo on
|
||||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
cl.exe /nologo /MT /W4 /GX /YX %OPTS% /I %OUTDIR% /I . /I glob /I w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.obj /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
|
@echo off
|
||||||
echo WinDebug\variable.obj >>link.dbg
|
echo %OUTDIR%\%1.obj >>%OUTDIR%\link.sc
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
|
goto :EOF
|
||||||
echo WinDebug\rule.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
|
:GccCompile
|
||||||
echo WinDebug\remote-stub.obj >>link.dbg
|
:: GCC Compile
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
|
|
||||||
echo WinDebug\commands.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
|
|
||||||
echo WinDebug\file.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
|
|
||||||
echo WinDebug\getloadavg.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
|
|
||||||
echo WinDebug\default.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
|
|
||||||
echo WinDebug\signame.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
|
|
||||||
echo WinDebug\expand.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
|
|
||||||
echo WinDebug\dir.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
|
|
||||||
echo WinDebug\main.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
|
|
||||||
echo WinDebug\getopt1.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
|
|
||||||
echo WinDebug\job.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
|
|
||||||
echo WinDebug\read.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
|
|
||||||
echo WinDebug\version.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
|
|
||||||
echo WinDebug\getopt.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
|
|
||||||
echo WinDebug\arscan.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c hash.c
|
|
||||||
echo WinDebug\hash.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c strcache.c
|
|
||||||
echo WinDebug\strcache.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
|
|
||||||
echo WinDebug\remake.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
|
|
||||||
echo WinDebug\misc.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
|
|
||||||
echo WinDebug\ar.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
|
|
||||||
echo WinDebug\function.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
|
|
||||||
echo WinDebug\vpath.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
|
|
||||||
echo WinDebug\implicit.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
|
|
||||||
echo WinDebug\dirent.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
|
|
||||||
echo WinDebug\glob.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
|
|
||||||
echo WinDebug\fnmatch.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
|
|
||||||
echo WinDebug\pathstuff.obj >>link.dbg
|
|
||||||
echo off
|
|
||||||
echo "Linking WinDebug/%make%.exe"
|
|
||||||
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/hash.obj .\WinDebug/strcache.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj
|
|
||||||
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg
|
|
||||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe @link.dbg
|
|
||||||
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
|
||||||
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
|
||||||
if not exist .\WinRel\nul mkdir .\WinRel
|
|
||||||
echo on
|
echo on
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
|
gcc -mthreads -Wall -gdwarf-2 -g3 %OPTS% -I%OUTDIR% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%\%1.o -c %1.c
|
||||||
echo WinRel\variable.obj >>link.rel
|
@echo off
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
|
goto :EOF
|
||||||
echo WinRel\rule.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
|
:Link
|
||||||
echo WinRel\remote-stub.obj >>link.rel
|
echo Linking %OUTDIR%/%MAKE%.exe
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
|
if "%COMPILER%" == "gcc" goto GccLink
|
||||||
echo WinRel\commands.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
|
:: MSVC Link
|
||||||
echo WinRel\file.obj >>link.rel
|
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
|
|
||||||
echo WinRel\getloadavg.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
|
|
||||||
echo WinRel\default.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
|
|
||||||
echo WinRel\signame.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
|
|
||||||
echo WinRel\expand.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
|
|
||||||
echo WinRel\dir.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
|
|
||||||
echo WinRel\main.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
|
|
||||||
echo WinRel\getopt1.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
|
|
||||||
echo WinRel\job.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
|
|
||||||
echo WinRel\read.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
|
|
||||||
echo WinRel\version.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
|
|
||||||
echo WinRel\getopt.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
|
|
||||||
echo WinRel\arscan.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
|
|
||||||
echo WinRel\remake.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c hash.c
|
|
||||||
echo WinRel\hash.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c strcache.c
|
|
||||||
echo WinRel\strcache.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
|
|
||||||
echo WinRel\misc.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
|
|
||||||
echo WinRel\ar.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
|
|
||||||
echo WinRel\function.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
|
|
||||||
echo WinRel\vpath.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
|
|
||||||
echo WinRel\implicit.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
|
|
||||||
echo WinRel\dirent.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
|
|
||||||
echo WinRel\glob.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
|
|
||||||
echo WinRel\fnmatch.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
|
|
||||||
echo WinRel\pathstuff.obj >>link.rel
|
|
||||||
echo off
|
|
||||||
echo "Linking WinRel/%make%.exe"
|
|
||||||
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/hash.obj .\WinRel/strcache.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj
|
|
||||||
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel
|
|
||||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /OUT:.\WinRel/%make%.exe @link.rel
|
|
||||||
if not exist .\WinRel/%make%.exe echo "WinRel build failed"
|
|
||||||
if exist .\WinRel/%make%.exe echo "WinRel build succeeded!"
|
|
||||||
set make=
|
|
||||||
GoTo BuildEnd
|
|
||||||
:GCCBuild
|
|
||||||
echo on
|
echo on
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c variable.c
|
link.exe /NOLOGO /SUBSYSTEM:console /PDB:%OUTDIR%\%MAKE%.pdb %LINKOPTS% /OUT:%OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c rule.c
|
@echo off
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remote-stub.c
|
goto :EOF
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c commands.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c file.c
|
:GccLink
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getloadavg.c
|
:: GCC Link
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c default.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c signame.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c expand.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c dir.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c main.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt1.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c job.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c read.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c version.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c arscan.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remake.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c hash.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c strcache.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c misc.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ar.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c function.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c vpath.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c implicit.c
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/glob.c -o glob.o
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
|
|
||||||
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
|
||||||
gcc -mthreads -gdwarf-2 -g3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o job.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o glob.o fnmatch.o pathstuff.o w32_misc.o sub_proc.o w32err.o -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
|
|
||||||
:BuildEnd
|
|
||||||
echo on
|
echo on
|
||||||
|
gcc -mthreads -gdwarf-2 -g3 -o %OUTDIR%\%MAKE%.exe %OUTDIR%\variable.o %OUTDIR%\rule.o %OUTDIR%\remote-stub.o %OUTDIR%\commands.o %OUTDIR%\file.o %OUTDIR%\getloadavg.o %OUTDIR%\default.o %OUTDIR%\signame.o %OUTDIR%\expand.o %OUTDIR%\dir.o %OUTDIR%\main.o %OUTDIR%\getopt1.o %OUTDIR%\guile.o %OUTDIR%\job.o %OUTDIR%\output.o %OUTDIR%\read.o %OUTDIR%\version.o %OUTDIR%\getopt.o %OUTDIR%\arscan.o %OUTDIR%\remake.o %OUTDIR%\misc.o %OUTDIR%\hash.o %OUTDIR%\strcache.o %OUTDIR%\ar.o %OUTDIR%\function.o %OUTDIR%\vpath.o %OUTDIR%\implicit.o %OUTDIR%\loadapi.o %OUTDIR%\load.o %OUTDIR%\glob\glob.o %OUTDIR%\glob\fnmatch.o %OUTDIR%\w32\pathstuff.o %OUTDIR%\w32\compat\posixfcn.o %OUTDIR%\w32\w32os.o %OUTDIR%\w32\subproc\misc.o %OUTDIR%\w32\subproc\sub_proc.o %OUTDIR%\w32\subproc\w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a
|
||||||
|
@echo off
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:ConfigSCM
|
||||||
|
echo Generating config from SCM templates
|
||||||
|
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > %OUTDIR%\config.h.W32.sed
|
||||||
|
echo s,%%PACKAGE%%,make,g >> %OUTDIR%\config.h.W32.sed
|
||||||
|
sed -f %OUTDIR%\config.h.W32.sed config.h.W32.template > config.h.W32
|
||||||
|
echo static const char *const GUILE_module_defn = ^" \> gmk-default.h
|
||||||
|
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" gmk-default.scm >> gmk-default.h
|
||||||
|
echo ^";>> gmk-default.h
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:ChkGuile
|
||||||
|
if not "%OS%" == "Windows_NT" goto NoGuile
|
||||||
|
pkg-config --help > %OUTDIR%\guile.tmp 2> NUL
|
||||||
|
if ERRORLEVEL 1 goto NoPkgCfg
|
||||||
|
|
||||||
|
echo Checking for Guile 2.0
|
||||||
|
if not "%COMPILER%" == "gcc" set PKGMSC=--msvc-syntax
|
||||||
|
pkg-config --cflags --short-errors "guile-2.0" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||||
|
|
||||||
|
echo Checking for Guile 1.8
|
||||||
|
pkg-config --cflags --short-errors "guile-1.8" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||||
|
|
||||||
|
echo No Guile found, building without Guile
|
||||||
|
goto GuileDone
|
||||||
|
|
||||||
|
:NoPkgCfg
|
||||||
|
echo pkg-config not found, building without Guile
|
||||||
|
|
||||||
|
:GuileDone
|
||||||
|
if "%GUILECFLAGS%" == "" goto :EOF
|
||||||
|
|
||||||
|
echo Guile found, building with Guile
|
||||||
|
set "GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE"
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Usage
|
||||||
|
echo Usage: %0 [options] [gcc]
|
||||||
|
echo Options:
|
||||||
|
echo. --debug For GCC only, make a debug build
|
||||||
|
echo. (MSVC build always makes both debug and release)
|
||||||
|
echo. --without-guile Do not compile Guile support even if found
|
||||||
|
echo. --help Display these instructions and exit
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Reset
|
||||||
|
set COMPILER=
|
||||||
|
set DEBUG=
|
||||||
|
set GUILE=
|
||||||
|
set GUILECFLAGS=
|
||||||
|
set GUILELIBS=
|
||||||
|
set LINKOPTS=
|
||||||
|
set MAKE=
|
||||||
|
set NOGUILE=
|
||||||
|
set OPTS=
|
||||||
|
set OUTDIR=
|
||||||
|
set PKGMSC=
|
||||||
|
goto :EOF
|
||||||
|
|||||||
189
commands.c
189
commands.c
@@ -1,7 +1,5 @@
|
|||||||
/* Command processing for GNU Make.
|
/* Command processing for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,9 +14,9 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "dep.h"
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
|
#include "dep.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
@@ -28,14 +26,14 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if VMS
|
#if VMS
|
||||||
# define FILE_LIST_SEPARATOR ','
|
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
|
||||||
#else
|
#else
|
||||||
# define FILE_LIST_SEPARATOR ' '
|
# define FILE_LIST_SEPARATOR ' '
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int remote_kill (int id, int sig);
|
int remote_kill (int id, int sig);
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
#ifndef HAVE_UNISTD_H
|
||||||
int getpid ();
|
int getpid ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -70,9 +68,9 @@ set_file_variables (struct file *file)
|
|||||||
struct dep *d;
|
struct dep *d;
|
||||||
const char *at, *percent, *star, *less;
|
const char *at, *percent, *star, *less;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
/* If the target is an archive member `lib(member)',
|
/* If the target is an archive member 'lib(member)',
|
||||||
then $@ is `lib' and $% is `member'. */
|
then $@ is 'lib' and $% is 'member'. */
|
||||||
|
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
@@ -92,7 +90,7 @@ set_file_variables (struct file *file)
|
|||||||
percent = p;
|
percent = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* NO_ARCHIVES. */
|
#endif /* NO_ARCHIVES. */
|
||||||
{
|
{
|
||||||
at = file->name;
|
at = file->name;
|
||||||
percent = "";
|
percent = "";
|
||||||
@@ -102,35 +100,35 @@ set_file_variables (struct file *file)
|
|||||||
if (file->stem == 0)
|
if (file->stem == 0)
|
||||||
{
|
{
|
||||||
/* In Unix make, $* is set to the target name with
|
/* In Unix make, $* is set to the target name with
|
||||||
any suffix in the .SUFFIXES list stripped off for
|
any suffix in the .SUFFIXES list stripped off for
|
||||||
explicit rules. We store this in the `stem' member. */
|
explicit rules. We store this in the 'stem' member. */
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
name = strchr (file->name, '(') + 1;
|
name = strchr (file->name, '(') + 1;
|
||||||
len = strlen (name) - 1;
|
len = strlen (name) - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
name = file->name;
|
name = file->name;
|
||||||
len = strlen (name);
|
len = strlen (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||||
{
|
{
|
||||||
unsigned int slen = strlen (dep_name (d));
|
unsigned int slen = strlen (dep_name (d));
|
||||||
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||||
{
|
{
|
||||||
file->stem = strcache_add_len (name, len - slen);
|
file->stem = strcache_add_len (name, len - slen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (d == 0)
|
if (d == 0)
|
||||||
file->stem = "";
|
file->stem = "";
|
||||||
}
|
}
|
||||||
star = file->stem;
|
star = file->stem;
|
||||||
|
|
||||||
@@ -149,7 +147,7 @@ set_file_variables (struct file *file)
|
|||||||
In this case $< is the same as $@. */
|
In this case $< is the same as $@. */
|
||||||
less = at;
|
less = at;
|
||||||
|
|
||||||
#define DEFINE_VARIABLE(name, len, value) \
|
#define DEFINE_VARIABLE(name, len, value) \
|
||||||
(void) define_variable_for_file (name,len,value,o_automatic,0,file)
|
(void) define_variable_for_file (name,len,value,o_automatic,0,file)
|
||||||
|
|
||||||
/* Define the variables. */
|
/* Define the variables. */
|
||||||
@@ -202,13 +200,13 @@ set_file_variables (struct file *file)
|
|||||||
|
|
||||||
cp = plus_value;
|
cp = plus_value;
|
||||||
|
|
||||||
qmark_len = plus_len + 1; /* Will be this or less. */
|
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||||
{
|
{
|
||||||
const char *c = dep_name (d);
|
const char *c = dep_name (d);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
{
|
{
|
||||||
c = strchr (c, '(') + 1;
|
c = strchr (c, '(') + 1;
|
||||||
@@ -222,7 +220,7 @@ set_file_variables (struct file *file)
|
|||||||
cp += len;
|
cp += len;
|
||||||
*cp++ = FILE_LIST_SEPARATOR;
|
*cp++ = FILE_LIST_SEPARATOR;
|
||||||
if (! (d->changed || always_make_flag))
|
if (! (d->changed || always_make_flag))
|
||||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Kill the last space and define the variable. */
|
/* Kill the last space and define the variable. */
|
||||||
@@ -277,23 +275,23 @@ set_file_variables (struct file *file)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
c = dep_name (d);
|
c = dep_name (d);
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
{
|
{
|
||||||
c = strchr (c, '(') + 1;
|
c = strchr (c, '(') + 1;
|
||||||
len = strlen (c) - 1;
|
len = strlen (c) - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
len = strlen (c);
|
len = strlen (c);
|
||||||
|
|
||||||
if (d->ignore_mtime)
|
if (d->ignore_mtime)
|
||||||
{
|
{
|
||||||
memcpy (bp, c, len);
|
memcpy (bp, c, len);
|
||||||
bp += len;
|
bp += len;
|
||||||
*bp++ = FILE_LIST_SEPARATOR;
|
*bp++ = FILE_LIST_SEPARATOR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy (cp, c, len);
|
memcpy (cp, c, len);
|
||||||
cp += len;
|
cp += len;
|
||||||
@@ -321,11 +319,11 @@ set_file_variables (struct file *file)
|
|||||||
DEFINE_VARIABLE ("|", 1, bar_value);
|
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef DEFINE_VARIABLE
|
#undef DEFINE_VARIABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chop CMDS up into individual command lines if necessary.
|
/* Chop CMDS up into individual command lines if necessary.
|
||||||
Also set the `lines_flags' and `any_recurse' members. */
|
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||||
|
|
||||||
void
|
void
|
||||||
chop_commands (struct commands *cmds)
|
chop_commands (struct commands *cmds)
|
||||||
@@ -402,6 +400,9 @@ chop_commands (struct commands *cmds)
|
|||||||
/* Finally, set the corresponding CMDS->lines_flags elements and the
|
/* Finally, set the corresponding CMDS->lines_flags elements and the
|
||||||
CMDS->any_recurse flag. */
|
CMDS->any_recurse flag. */
|
||||||
|
|
||||||
|
if (nlines > USHRT_MAX)
|
||||||
|
ON (fatal, &cmds->fileinfo, _("Recipe has too many lines (%ud)"), nlines);
|
||||||
|
|
||||||
cmds->ncommand_lines = nlines;
|
cmds->ncommand_lines = nlines;
|
||||||
cmds->command_lines = lines;
|
cmds->command_lines = lines;
|
||||||
|
|
||||||
@@ -410,10 +411,10 @@ chop_commands (struct commands *cmds)
|
|||||||
|
|
||||||
for (idx = 0; idx < nlines; ++idx)
|
for (idx = 0; idx < nlines; ++idx)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
unsigned char flags = 0;
|
||||||
const char *p = lines[idx];
|
const char *p = lines[idx];
|
||||||
|
|
||||||
while (isblank (*p) || *p == '-' || *p == '@' || *p == '+')
|
while (ISBLANK (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||||
switch (*(p++))
|
switch (*(p++))
|
||||||
{
|
{
|
||||||
case '+':
|
case '+':
|
||||||
@@ -433,7 +434,7 @@ chop_commands (struct commands *cmds)
|
|||||||
flags |= COMMANDS_RECURSE;
|
flags |= COMMANDS_RECURSE;
|
||||||
|
|
||||||
cmds->lines_flags[idx] = flags;
|
cmds->lines_flags[idx] = flags;
|
||||||
cmds->any_recurse |= flags & COMMANDS_RECURSE;
|
cmds->any_recurse |= flags & COMMANDS_RECURSE ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,13 +451,13 @@ execute_file_commands (struct file *file)
|
|||||||
the commands are nothing but whitespace. */
|
the commands are nothing but whitespace. */
|
||||||
|
|
||||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||||
if (!isspace ((unsigned char)*p) && *p != '-' && *p != '@')
|
if (!ISSPACE (*p) && *p != '-' && *p != '@' && *p != '+')
|
||||||
break;
|
break;
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
{
|
{
|
||||||
/* If there are no commands, assume everything worked. */
|
/* If there are no commands, assume everything worked. */
|
||||||
set_command_state (file, cs_running);
|
set_command_state (file, cs_running);
|
||||||
file->update_status = 0;
|
file->update_status = us_success;
|
||||||
notice_finished_file (file);
|
notice_finished_file (file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -467,6 +468,11 @@ execute_file_commands (struct file *file)
|
|||||||
|
|
||||||
set_file_variables (file);
|
set_file_variables (file);
|
||||||
|
|
||||||
|
/* If this is a loaded dynamic object, unload it before remaking.
|
||||||
|
Some systems don't support overwriting a loaded object. */
|
||||||
|
if (file->loaded)
|
||||||
|
unload_file (file->name);
|
||||||
|
|
||||||
/* Start the commands running. */
|
/* Start the commands running. */
|
||||||
new_job (file);
|
new_job (file);
|
||||||
}
|
}
|
||||||
@@ -511,14 +517,14 @@ fatal_error_signal (int sig)
|
|||||||
DWORD susp_count = SuspendThread (main_thread);
|
DWORD susp_count = SuspendThread (main_thread);
|
||||||
|
|
||||||
if (susp_count != 0)
|
if (susp_count != 0)
|
||||||
fprintf (stderr, "SuspendThread: suspend count = %ld\n", susp_count);
|
fprintf (stderr, "SuspendThread: suspend count = %ld\n", susp_count);
|
||||||
else if (susp_count == (DWORD)-1)
|
else if (susp_count == (DWORD)-1)
|
||||||
{
|
{
|
||||||
DWORD ierr = GetLastError ();
|
DWORD ierr = GetLastError ();
|
||||||
|
|
||||||
fprintf (stderr, "SuspendThread: error %ld: %s\n",
|
fprintf (stderr, "SuspendThread: error %ld: %s\n",
|
||||||
ierr, map_windows32_error_to_string (ierr));
|
ierr, map_windows32_error_to_string (ierr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
handling_fatal_signal = 1;
|
handling_fatal_signal = 1;
|
||||||
@@ -534,8 +540,8 @@ fatal_error_signal (int sig)
|
|||||||
{
|
{
|
||||||
struct child *c;
|
struct child *c;
|
||||||
for (c = children; c != 0; c = c->next)
|
for (c = children; c != 0; c = c->next)
|
||||||
if (!c->remote)
|
if (!c->remote)
|
||||||
(void) kill (c->pid, SIGTERM);
|
(void) kill (c->pid, SIGTERM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we got a signal that means the user
|
/* If we got a signal that means the user
|
||||||
@@ -553,18 +559,18 @@ fatal_error_signal (int sig)
|
|||||||
struct child *c;
|
struct child *c;
|
||||||
|
|
||||||
/* Remote children won't automatically get signals sent
|
/* Remote children won't automatically get signals sent
|
||||||
to the process group, so we must send them. */
|
to the process group, so we must send them. */
|
||||||
for (c = children; c != 0; c = c->next)
|
for (c = children; c != 0; c = c->next)
|
||||||
if (c->remote)
|
if (c->remote)
|
||||||
(void) remote_kill (c->pid, sig);
|
(void) remote_kill (c->pid, sig);
|
||||||
|
|
||||||
for (c = children; c != 0; c = c->next)
|
for (c = children; c != 0; c = c->next)
|
||||||
delete_child_targets (c);
|
delete_child_targets (c);
|
||||||
|
|
||||||
/* Clean up the children. We don't just use the call below because
|
/* Clean up the children. We don't just use the call below because
|
||||||
we don't want to print the "Waiting for children" message. */
|
we don't want to print the "Waiting for children" message. */
|
||||||
while (job_slots_used > 0)
|
while (job_slots_used > 0)
|
||||||
reap_children (1, 0);
|
reap_children (1, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Wait for our children to die. */
|
/* Wait for our children to die. */
|
||||||
@@ -579,7 +585,7 @@ fatal_error_signal (int sig)
|
|||||||
if (sig == SIGQUIT)
|
if (sig == SIGQUIT)
|
||||||
/* We don't want to send ourselves SIGQUIT, because it will
|
/* We don't want to send ourselves SIGQUIT, because it will
|
||||||
cause a core dump. Just exit instead. */
|
cause a core dump. Just exit instead. */
|
||||||
exit (EXIT_FAILURE);
|
exit (MAKE_TROUBLE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
@@ -614,17 +620,19 @@ delete_target (struct file *file, const char *on_behalf_of)
|
|||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||||
? (time_t) -1
|
? (time_t) -1
|
||||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||||
if (ar_member_date (file->name) != file_date)
|
if (ar_member_date (file->name) != file_date)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error (NILF, _("*** [%s] Archive member `%s' may be bogus; not deleted"),
|
OSS (error, NILF,
|
||||||
on_behalf_of, file->name);
|
_("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||||
else
|
on_behalf_of, file->name);
|
||||||
error (NILF, _("*** Archive member `%s' may be bogus; not deleted"),
|
else
|
||||||
file->name);
|
OS (error, NILF,
|
||||||
}
|
_("*** Archive member '%s' may be bogus; not deleted"),
|
||||||
|
file->name);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -635,12 +643,13 @@ delete_target (struct file *file, const char *on_behalf_of)
|
|||||||
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error (NILF, _("*** [%s] Deleting file `%s'"), on_behalf_of, file->name);
|
OSS (error, NILF,
|
||||||
|
_("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||||
else
|
else
|
||||||
error (NILF, _("*** Deleting file `%s'"), file->name);
|
OS (error, NILF, _("*** Deleting file '%s'"), file->name);
|
||||||
if (unlink (file->name) < 0
|
if (unlink (file->name) < 0
|
||||||
&& errno != ENOENT) /* It disappeared; so what. */
|
&& errno != ENOENT) /* It disappeared; so what. */
|
||||||
perror_with_name ("unlink: ", file->name);
|
perror_with_name ("unlink: ", file->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,7 +668,7 @@ delete_child_targets (struct child *child)
|
|||||||
/* Delete the target file if it changed. */
|
/* Delete the target file if it changed. */
|
||||||
delete_target (child->file, NULL);
|
delete_target (child->file, NULL);
|
||||||
|
|
||||||
/* Also remove any non-precious targets listed in the `also_make' member. */
|
/* Also remove any non-precious targets listed in the 'also_make' member. */
|
||||||
for (d = child->file->also_make; d != 0; d = d->next)
|
for (d = child->file->also_make; d != 0; d = d->next)
|
||||||
delete_target (d->file, child->file->name);
|
delete_target (d->file, child->file->name);
|
||||||
|
|
||||||
@@ -678,17 +687,23 @@ print_commands (const struct commands *cmds)
|
|||||||
if (cmds->fileinfo.filenm == 0)
|
if (cmds->fileinfo.filenm == 0)
|
||||||
puts (_(" (built-in):"));
|
puts (_(" (built-in):"));
|
||||||
else
|
else
|
||||||
printf (_(" (from `%s', line %lu):\n"),
|
printf (_(" (from '%s', line %lu):\n"),
|
||||||
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||||
|
|
||||||
s = cmds->commands;
|
s = cmds->commands;
|
||||||
while (*s != '\0')
|
while (*s != '\0')
|
||||||
{
|
{
|
||||||
const char *end;
|
const char *end;
|
||||||
|
int bs;
|
||||||
|
|
||||||
end = strchr (s, '\n');
|
/* Print one full logical recipe line: find a non-escaped newline. */
|
||||||
if (end == 0)
|
for (end = s, bs = 0; *end != '\0'; ++end)
|
||||||
end = s + strlen (s);
|
{
|
||||||
|
if (*end == '\n' && !bs)
|
||||||
|
break;
|
||||||
|
|
||||||
|
bs = *end == '\\' ? !bs : 0;
|
||||||
|
}
|
||||||
|
|
||||||
printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
|
printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
|
||||||
|
|
||||||
|
|||||||
27
commands.h
27
commands.h
@@ -1,7 +1,5 @@
|
|||||||
/* Definition of data structures describing shell commands for GNU Make.
|
/* Definition of data structures describing shell commands for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -21,19 +19,20 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
struct commands
|
struct commands
|
||||||
{
|
{
|
||||||
struct floc fileinfo; /* Where commands were defined. */
|
gmk_floc fileinfo; /* Where commands were defined. */
|
||||||
char *commands; /* Commands text. */
|
char *commands; /* Commands text. */
|
||||||
unsigned int ncommand_lines;/* Number of command lines. */
|
char **command_lines; /* Commands chopped up into lines. */
|
||||||
char **command_lines; /* Commands chopped up into lines. */
|
unsigned char *lines_flags; /* One set of flag bits for each line. */
|
||||||
char *lines_flags; /* One set of flag bits for each line. */
|
unsigned short ncommand_lines;/* Number of command lines. */
|
||||||
int any_recurse; /* Nonzero if any `lines_recurse' elt has */
|
char recipe_prefix; /* Recipe prefix for this command set. */
|
||||||
/* the COMMANDS_RECURSE bit set. */
|
unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
||||||
|
/* the COMMANDS_RECURSE bit set. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Bits in `lines_flags'. */
|
/* Bits in 'lines_flags'. */
|
||||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||||
|
|
||||||
void execute_file_commands (struct file *file);
|
void execute_file_commands (struct file *file);
|
||||||
void print_commands (const struct commands *cmds);
|
void print_commands (const struct commands *cmds);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/* config.h -- hand-massaged for Amiga -*-C-*-
|
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -17,7 +16,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* Define if on AIX 3.
|
/* Define if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
We just want to avoid a redefinition error message. */
|
We just want to avoid a redefinition error message. */
|
||||||
#ifndef _ALL_SOURCE
|
#ifndef _ALL_SOURCE
|
||||||
/* #undef _ALL_SOURCE */
|
/* #undef _ALL_SOURCE */
|
||||||
#endif
|
#endif
|
||||||
@@ -38,14 +37,14 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define gid_t int
|
#define gid_t int
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define if you have alloca, as a function or macro. */
|
||||||
@@ -54,25 +53,25 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
|
||||||
/* #undef HAVE_DOPRNT */
|
|
||||||
|
|
||||||
/* Define if your system has a working fnmatch function. */
|
/* Define if your system has a working fnmatch function. */
|
||||||
/* #undef HAVE_FNMATCH */
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define if your system has its own 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define if you have the getmntent function. */
|
||||||
/* #undef HAVE_GETMNTENT */
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Embed GNU Guile support */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
|
/* Define if the 'long double' type works. */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
/* #undef HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
/* Define if you support file names longer than 14 characters. */
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define if you have a working 'mmap' system call. */
|
||||||
/* #undef HAVE_MMAP */
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Define if system calls automatically restart after interruption
|
||||||
@@ -85,7 +84,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if your struct stat has st_blocks. */
|
/* Define if your struct stat has st_blocks. */
|
||||||
/* #undef HAVE_ST_BLOCKS */
|
/* #undef HAVE_ST_BLOCKS */
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
/* Define if you have the strcoll function and it is properly defined. */
|
||||||
#define HAVE_STRCOLL 1
|
#define HAVE_STRCOLL 1
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
/* Define if your struct stat has st_rdev. */
|
||||||
@@ -94,7 +93,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have the strftime function. */
|
/* Define if you have the strftime function. */
|
||||||
#define HAVE_STRFTIME 1
|
#define HAVE_STRFTIME 1
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
/* Define if your struct tm has tm_zone. */
|
||||||
@@ -110,16 +109,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
/* #undef HAVE_UTIME_NULL */
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
/* Define if you have the wait3 system call. */
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define if on MINIX. */
|
||||||
/* #undef _MINIX */
|
/* #undef _MINIX */
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
/* Define if your struct nlist has an n_un member. */
|
||||||
@@ -131,7 +124,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define pid_t int
|
#define pid_t int
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
/* Define if the system does not provide POSIX.1 features except
|
||||||
@@ -152,28 +145,25 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* If using the C implementation of alloca, define if you know the
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
automatically deduced at run-time.
|
automatically deduced at run-time.
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
STACK_DIRECTION = 0 => direction of growth unknown
|
||||||
*/
|
*/
|
||||||
#define STACK_DIRECTION -1
|
#define STACK_DIRECTION -1
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define if your compiler conforms to the ANSI C standard. */
|
/* Define if you have the ANSI C header files. */
|
||||||
#define HAVE_ANSI_COMPILER 1
|
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#define STDC_HEADERS
|
#define STDC_HEADERS
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define if 'sys_siglist' is declared by <signal.h>. */
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
/* Define for Encore UMAX. */
|
||||||
@@ -183,19 +173,16 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
instead of <sys/cpustats.h>. */
|
instead of <sys/cpustats.h>. */
|
||||||
/* #undef UMAX4_3 */
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
|
||||||
/* #undef vfork */
|
|
||||||
|
|
||||||
/* Name of this package (needed by automake) */
|
/* Name of this package (needed by automake) */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Version of this package (needed by automake) */
|
/* Version of this package (needed by automake) */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
#define SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
/* Define this to enable job server support in GNU make. */
|
||||||
@@ -205,13 +192,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
if it exists. */
|
if it exists. */
|
||||||
/* #undef ST_MTIM_NSEC */
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
/* Define this if the C library defines the variable 'sys_siglist'. */
|
||||||
/* #undef HAVE_SYS_SIGLIST */
|
/* #undef HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* Define this if the C library defines the variable '_sys_siglist'. */
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
/* #undef HAVE__SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/* Define this if you have the 'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
/* Define if you have the dup2 function. */
|
||||||
@@ -247,7 +234,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have the seteuid function. */
|
/* Define if you have the seteuid function. */
|
||||||
/* #undef HAVE_SETEUID */
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
/* Define if you have the setlinebuf function. */
|
/* Define if you have the setlinebuf function. */
|
||||||
/* #undef HAVE_SETLINEBUF */
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
/* Define if you have the setregid function. */
|
/* Define if you have the setregid function. */
|
||||||
@@ -256,7 +243,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have the setreuid function. */
|
/* Define if you have the setreuid function. */
|
||||||
/* #undef HAVE_SETREUID */
|
/* #undef HAVE_SETREUID */
|
||||||
|
|
||||||
/* Define if you have the sigsetmask function. */
|
/* Define if you have the sigsetmask function. */
|
||||||
/* #undef HAVE_SIGSETMASK */
|
/* #undef HAVE_SIGSETMASK */
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
/* Define if you have the socket function. */
|
||||||
@@ -301,9 +288,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have the <ndir.h> header file. */
|
/* Define if you have the <ndir.h> header file. */
|
||||||
/* #undef HAVE_NDIR_H */
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
|
||||||
#define HAVE_STDARG_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <stdlib.h> header file. */
|
/* Define if you have the <stdlib.h> header file. */
|
||||||
/* #undef HAVE_STDLIB_H */
|
/* #undef HAVE_STDLIB_H */
|
||||||
|
|
||||||
@@ -334,9 +318,18 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define if you have the kstat library (-lkstat). */
|
/* Define if you have the kstat library (-lkstat). */
|
||||||
/* #undef HAVE_LIBKSTAT */
|
/* #undef HAVE_LIBKSTAT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
/* #undef HAVE_ISATTY */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
/* #undef HAVE_TTYNAME */
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
/* Define if you have the sun library (-lsun). */
|
||||||
/* #undef HAVE_LIBSUN */
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
|
/* Output sync sypport */
|
||||||
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
/* Define for Case Insensitve behavior */
|
/* Define for Case Insensitve behavior */
|
||||||
#define HAVE_CASE_INSENSITIVE_FS
|
#define HAVE_CASE_INSENSITIVE_FS
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||||
|
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -17,7 +16,13 @@ You should have received a copy of the GNU General Public License along with
|
|||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* config.h. Generated automatically by configure. */
|
/* config.h. Generated automatically by configure. */
|
||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h.in. Generated automatically from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Pull in types.h here to get __CRTL_VER defined for old versions of the
|
||||||
|
compiler which don't define it. */
|
||||||
|
#ifdef __DECC
|
||||||
|
# include <types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if on AIX 3.
|
/* Define to 1 if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
@@ -35,6 +40,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
||||||
/* #undef HAVE_GETTEXT */
|
/* #undef HAVE_GETTEXT */
|
||||||
|
|
||||||
|
/* Embed GNU Guile support */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
/* Define to 1 if your locale.h file contains LC_MESSAGES. */
|
/* Define to 1 if your locale.h file contains LC_MESSAGES. */
|
||||||
/* #undef HAVE_LC_MESSAGES */
|
/* #undef HAVE_LC_MESSAGES */
|
||||||
|
|
||||||
@@ -57,14 +65,14 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
/* #undef gid_t */
|
/* #undef gid_t */
|
||||||
|
|
||||||
/* Define to 1 if you have alloca, as a function or macro. */
|
/* Define to 1 if you have alloca, as a function or macro. */
|
||||||
@@ -73,28 +81,25 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define to 1 if you don't have vprintf but do have _doprnt. */
|
|
||||||
/* #undef HAVE_DOPRNT */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the fdopen function. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
#define HAVE_FDOPEN 1
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
/* Define to 1 if your system has a working fnmatch function. */
|
/* Define to 1 if your system has a working fnmatch function. */
|
||||||
/* #undef HAVE_FNMATCH */
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
/* Define to 1 if your system has its own `getloadavg' function. */
|
/* Define to 1 if your system has its own 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define to 1 if you have the getmntent function. */
|
/* Define to 1 if you have the getmntent function. */
|
||||||
/* #undef HAVE_GETMNTENT */
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define to 1 if the `long double' type works. */
|
/* Define to 1 if the 'long double' type works. */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
/* #undef HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
/* Define to 1 if you support file names longer than 14 characters. */
|
/* Define to 1 if you support file names longer than 14 characters. */
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define to 1 if you have a working `mmap' system call. */
|
/* Define to 1 if you have a working 'mmap' system call. */
|
||||||
/* #undef HAVE_MMAP */
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define to 1 if system calls automatically restart after interruption
|
/* Define to 1 if system calls automatically restart after interruption
|
||||||
@@ -110,6 +115,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the strcoll function and it is properly defined. */
|
/* Define to 1 if you have the strcoll function and it is properly defined. */
|
||||||
/* #undef HAVE_STRCOLL */
|
/* #undef HAVE_STRCOLL */
|
||||||
|
|
||||||
|
/* Define 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. */
|
/* Define to 1 if your struct stat has st_rdev. */
|
||||||
/* #undef HAVE_ST_RDEV */
|
/* #undef HAVE_ST_RDEV */
|
||||||
|
|
||||||
@@ -134,12 +144,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define to 1 if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
/* #undef HAVE_UTIME_NULL */
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define to 1 if you have <vfork.h>. */
|
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the vprintf function. */
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the wait3 system call. */
|
/* Define to 1 if you have the wait3 system call. */
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
@@ -155,7 +159,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
||||||
#if __DECC_VER < 50090000
|
#if __DECC_VER < 50090000
|
||||||
#define pid_t int
|
#define pid_t int
|
||||||
@@ -179,13 +183,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* If using the C implementation of alloca, define if you know the
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
automatically deduced at run-time.
|
automatically deduced at run-time.
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
STACK_DIRECTION = 0 => direction of growth unknown
|
||||||
*/
|
*/
|
||||||
/* #undef STACK_DIRECTION */
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
@@ -194,10 +198,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define to 1 if `sys_siglist' is declared by <signal.h>. */
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h>. */
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#if __DECC_VER < 50090000
|
#if __DECC_VER < 50090000
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
#endif
|
#endif
|
||||||
@@ -209,19 +213,16 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
instead of <sys/cpustats.h>. */
|
instead of <sys/cpustats.h>. */
|
||||||
/* #undef UMAX4_3 */
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
|
||||||
/* #undef vfork */
|
|
||||||
|
|
||||||
/* Name of this package (needed by automake) */
|
/* Name of this package (needed by automake) */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Version of this package (needed by automake) */
|
/* Version of this package (needed by automake) */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
/* #undef SCCS_GET */
|
/* #undef SCCS_GET */
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
/* Define this to enable job server support in GNU make. */
|
||||||
@@ -231,13 +232,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
if it exists. */
|
if it exists. */
|
||||||
/* #undef ST_MTIM_NSEC */
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define to 1 if the C library defines the variable `sys_siglist'. */
|
/* Define to 1 if the C library defines the variable 'sys_siglist'. */
|
||||||
/* #undefine HAVE_SYS_SIGLIST */
|
/* #undefine HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define to 1 if the C library defines the variable `_sys_siglist'. */
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
/* #undef HAVE__SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define to 1 if you have the `union wait' type in <sys/wait.h>. */
|
/* Define to 1 if you have the 'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define to 1 if you have the dup2 function. */
|
/* Define to 1 if you have the dup2 function. */
|
||||||
@@ -255,9 +256,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the gethostname function. */
|
/* Define to 1 if you have the gethostname function. */
|
||||||
/* #undef HAVE_GETHOSTNAME */
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
|
|
||||||
/* Define to 1 if you have the getloadavg function. */
|
|
||||||
/* #undef HAVE_GETLOADAVG */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the memmove function. */
|
/* Define to 1 if you have the memmove function. */
|
||||||
#define HAVE_MEMMOVE 1
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
@@ -332,12 +330,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the <ndir.h> header file. */
|
/* Define to 1 if you have the <ndir.h> header file. */
|
||||||
/* #undef HAVE_NDIR_H */
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
/* Define to 1 if your compiler conforms to the ANSI C standard. */
|
|
||||||
#define HAVE_ANSI_COMPILER 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
|
||||||
#define HAVE_STDARG_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
@@ -370,6 +362,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the sun library (-lsun). */
|
/* Define to 1 if you have the sun library (-lsun). */
|
||||||
/* #undef HAVE_LIBSUN */
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
/* #undef HAVE_ISATTY */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
/* #undef HAVE_TTYNAME */
|
||||||
|
|
||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
@@ -386,15 +384,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* #undef HAVE_VMSDIR_H */
|
/* #undef HAVE_VMSDIR_H */
|
||||||
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
||||||
|
|
||||||
/* On older systems without 7.0 backport of CRTL the first one is defined */
|
/* On older systems without 7.0 backport of CRTL use non-VMS code for opendir() etc. */
|
||||||
#ifdef __CRTL_VER
|
#if __CRTL_VER < 70000000
|
||||||
# if __CRTL_VER < 70000000
|
# define HAVE_VMSDIR_H 1
|
||||||
# define HAVE_VMSDIR_H 1
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# if __VMS_VER < 70000000
|
|
||||||
# define HAVE_VMSDIR_H 1
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||||
@@ -420,10 +412,21 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define if using alloca.c. */
|
||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
/* maybe this should be placed into make.h */
|
/* maybe this should be placed into makeint.h */
|
||||||
#if defined(__VAX) && defined(__DECC)
|
#if defined(__VAX) && defined(__DECC)
|
||||||
#define alloca(n) __ALLOCA(n)
|
#define alloca(n) __ALLOCA(n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Output sync sypport */
|
||||||
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
|
/* Define to 1 to write even short single-line actions into a VMS/DCL command
|
||||||
|
file; this also enables exporting make environment variables into the
|
||||||
|
(sub-)process, which executes the action.
|
||||||
|
The usual make rules apply whether a shell variable - here a DCL symbol or
|
||||||
|
VMS logical [see CRTL getenv()] - is added to the make environment and
|
||||||
|
is exported. */
|
||||||
|
#define USE_DCL_COM_FILE 1
|
||||||
|
|
||||||
/* Build host information. */
|
/* Build host information. */
|
||||||
#define MAKE_HOST "VMS"
|
#define MAKE_HOST "VMS"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||||
|
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -28,19 +27,19 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
|
# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if the `closedir' function returns void instead of `int'. */
|
/* Define to 1 if the 'closedir' function returns void instead of 'int'. */
|
||||||
/* #undef CLOSEDIR_VOID */
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
/* 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.
|
systems. This function is required for 'alloca.c' support on those systems.
|
||||||
*/
|
*/
|
||||||
/* #undef CRAY_STACKSEG_END */
|
/* #undef CRAY_STACKSEG_END */
|
||||||
|
|
||||||
/* Define to 1 if using `alloca.c'. */
|
/* Define to 1 if using 'alloca.c'. */
|
||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
/* Define to 1 if using `getloadavg.c'. */
|
/* Define to 1 if using 'getloadavg.c'. */
|
||||||
/*#define C_GETLOADAVG 1*/
|
#define C_GETLOADAVG 1
|
||||||
|
|
||||||
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
|
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
@@ -52,34 +51,51 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid.
|
||||||
*/
|
*/
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if your compiler conforms to the ANSI C standard. */
|
/* Define to 1 if you have the 'atexit' function. */
|
||||||
#define HAVE_ANSI_COMPILER 1
|
#define HAVE_ATEXIT 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `bsd_signal' function. */
|
|
||||||
/* #undef HAVE_BSD_SIGNAL */
|
|
||||||
|
|
||||||
/* Use case insensitive file names */
|
/* Use case insensitive file names */
|
||||||
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||||
|
|
||||||
/* Define if you have the clock_gettime function. */
|
/* Define to 1 if you have the clock_gettime function. */
|
||||||
/* #undef HAVE_CLOCK_GETTIME */
|
/* #undef HAVE_CLOCK_GETTIME */
|
||||||
|
|
||||||
|
/* Embed GNU Guile support. Windows build sets this on the
|
||||||
|
compilation command line. */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_DCGETTEXT */
|
/* #undef HAVE_DCGETTEXT */
|
||||||
|
|
||||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
/* Define to 1 if you have the declaration of 'bsd_signal', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL_BSD_SIGNAL 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL_SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '_sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL__SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '__sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL___SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||||
*/
|
*/
|
||||||
#define HAVE_DIRENT_H 1
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
@@ -90,58 +106,61 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
# define HAVE_DIRECT_H 1
|
# define HAVE_DIRECT_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
|
||||||
/* #undef HAVE_DOPRNT */
|
|
||||||
|
|
||||||
/* Use platform specific coding */
|
/* Use platform specific coding */
|
||||||
#define HAVE_DOS_PATHS 1
|
#define HAVE_DOS_PATHS 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `dup2' function. */
|
/* Define to 1 if you have the 'dup2' function. */
|
||||||
#define HAVE_DUP2 1
|
#define HAVE_DUP2 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
#define HAVE_FCNTL_H 1
|
#define HAVE_FCNTL_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `fdopen' function. */
|
/* Define to 1 if you have the 'fdopen' function. */
|
||||||
/*#define HAVE_FDOPEN 1*/
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_FDOPEN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the `fork' function. */
|
/* Define to 1 if you have the 'fileno' function. */
|
||||||
/* #undef HAVE_FORK */
|
#define HAVE_FILENO 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `getcwd' function. */
|
/* Define to 1 if you have the 'getcwd' function. */
|
||||||
#define HAVE_GETCWD 1
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `getgroups' function. */
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
/* #undef HAVE_GETGROUPS */
|
/* #undef HAVE_GETGROUPS */
|
||||||
|
|
||||||
/* Define to 1 if you have the `gethostbyname' function. */
|
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||||
/* #undef HAVE_GETHOSTBYNAME */
|
/* #undef HAVE_GETHOSTBYNAME */
|
||||||
|
|
||||||
/* Define to 1 if you have the `gethostname' function. */
|
/* Define to 1 if you have the 'gethostname' function. */
|
||||||
/* #undef HAVE_GETHOSTNAME */
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
|
|
||||||
/* Define to 1 if you have the `getloadavg' function. */
|
/* Define to 1 if you have the 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define to 1 if you have the `getrlimit' function. */
|
/* Define to 1 if you have the 'getrlimit' function. */
|
||||||
/* #undef HAVE_GETRLIMIT */
|
/* #undef HAVE_GETRLIMIT */
|
||||||
|
|
||||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
/* #undef HAVE_GETTEXT */
|
/* #undef HAVE_GETTEXT */
|
||||||
|
|
||||||
/* Define if you have a standard gettimeofday function */
|
/* Define to 1 if you have a standard gettimeofday function */
|
||||||
/* #undef HAVE_GETTIMEOFDAY */
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_GETTIMEOFDAY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the iconv() function. */
|
/* Define if you have the iconv() function. */
|
||||||
/* #undef HAVE_ICONV */
|
/* #undef HAVE_ICONV */
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
/*#define HAVE_INTTYPES_H 1*/
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the `dgc' library (-ldgc). */
|
/* Define to 1 if you have the 'dgc' library (-ldgc). */
|
||||||
/* #undef HAVE_LIBDGC */
|
/* #undef HAVE_LIBDGC */
|
||||||
|
|
||||||
/* Define to 1 if you have the `kstat' library (-lkstat). */
|
/* Define to 1 if you have the 'kstat' library (-lkstat). */
|
||||||
/* #undef HAVE_LIBKSTAT */
|
/* #undef HAVE_LIBKSTAT */
|
||||||
|
|
||||||
/* Define to 1 if you have the <limits.h> header file. */
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
@@ -150,195 +169,203 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the <locale.h> header file. */
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
/*#define HAVE_LOCALE_H 1*/
|
/*#define HAVE_LOCALE_H 1*/
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'lstat' function. */
|
||||||
|
/* #undef HAVE_LSTAT */
|
||||||
|
|
||||||
/* Define to 1 if you have the <mach/mach.h> header file. */
|
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||||
/* #undef HAVE_MACH_MACH_H */
|
/* #undef HAVE_MACH_MACH_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the `memmove' function. */
|
|
||||||
#define HAVE_MEMMOVE 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
#define HAVE_MEMORY_H 1
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
/* Define to 1 if you have the 'mkstemp' function. */
|
||||||
/* #undef HAVE_MKSTEMP */
|
/* #undef HAVE_MKSTEMP */
|
||||||
|
|
||||||
/* Define to 1 if you have the `mktemp' function. */
|
/* Define to 1 if you have the 'mktemp' function. */
|
||||||
#define HAVE_MKTEMP 1
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */
|
||||||
/* #undef HAVE_NDIR_H */
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <nlist.h> header file. */
|
/* Define to 1 if you have the <nlist.h> header file. */
|
||||||
/* #undef HAVE_NLIST_H */
|
/* #undef HAVE_NLIST_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the `pipe' function. */
|
/* Define to 1 if you have the 'pipe' function. */
|
||||||
/* #undef HAVE_PIPE */
|
/* #undef HAVE_PIPE */
|
||||||
|
|
||||||
/* Define to 1 if you have the `pstat_getdynamic' function. */
|
/* Define to 1 if you have the 'pstat_getdynamic' function. */
|
||||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
/* Define to 1 if you have the `realpath' function. */
|
/* Define to 1 if you have the 'readlink' function. */
|
||||||
|
/* #undef HAVE_READLINK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'realpath' function. */
|
||||||
/* #undef HAVE_REALPATH */
|
/* #undef HAVE_REALPATH */
|
||||||
|
|
||||||
/* Define if <signal.h> defines the SA_RESTART constant. */
|
/* Define to 1 if <signal.h> defines the SA_RESTART constant. */
|
||||||
/* #undef HAVE_SA_RESTART */
|
/* #undef HAVE_SA_RESTART */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setegid' function. */
|
/* Define to 1 if you have the 'setegid' function. */
|
||||||
/* #undef HAVE_SETEGID */
|
/* #undef HAVE_SETEGID */
|
||||||
|
|
||||||
/* Define to 1 if you have the `seteuid' function. */
|
/* Define to 1 if you have the 'seteuid' function. */
|
||||||
/* #undef HAVE_SETEUID */
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setlinebuf' function. */
|
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||||
/* #undef HAVE_SETLINEBUF */
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setlocale' function. */
|
/* Define to 1 if you have the 'setlocale' function. */
|
||||||
/*#define HAVE_SETLOCALE 1*/
|
/*#define HAVE_SETLOCALE 1*/
|
||||||
|
|
||||||
/* Define to 1 if you have the `setregid' function. */
|
/* Define to 1 if you have the 'setregid' function. */
|
||||||
/* #undef HAVE_SETREGID */
|
/* #undef HAVE_SETREGID */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setreuid' function. */
|
/* Define to 1 if you have the 'setreuid' function. */
|
||||||
/* #undef HAVE_SETREUID */
|
/* #undef HAVE_SETREUID */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setrlimit' function. */
|
/* Define to 1 if you have the 'setrlimit' function. */
|
||||||
/* #undef HAVE_SETRLIMIT */
|
/* #undef HAVE_SETRLIMIT */
|
||||||
|
|
||||||
/* Define to 1 if you have the `setvbuf' function. */
|
/* Define to 1 if you have the 'setvbuf' function. */
|
||||||
/*#define HAVE_SETVBUF 1 */
|
#define HAVE_SETVBUF 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `sigaction' function. */
|
/* Define to 1 if you have the 'sigaction' function. */
|
||||||
/* #undef HAVE_SIGACTION */
|
/* #undef HAVE_SIGACTION */
|
||||||
|
|
||||||
/* Define to 1 if you have the `sigsetmask' function. */
|
/* Define to 1 if you have the 'sigsetmask' function. */
|
||||||
/* #undef HAVE_SIGSETMASK */
|
/* #undef HAVE_SIGSETMASK */
|
||||||
|
|
||||||
/* Define to 1 if you have the `socket' function. */
|
/* Define to 1 if you have the 'socket' function. */
|
||||||
/* #undef HAVE_SOCKET */
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
|
||||||
#define HAVE_STDARG_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
/*#define HAVE_STDINT_H 1*/
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strcasecmp' function. */
|
/* Define to 1 if you have the 'strcasecmp' function. */
|
||||||
/* #undef HAVE_STRCASECMP */
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the `strcmpi' function. */
|
/* Define to 1 if you have the 'strcmpi' function. */
|
||||||
/* #undef HAVE_STRCMPI */
|
#define HAVE_STRCMPI 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `stricmp' function. */
|
/* Define to 1 if you have the 'strcoll' function and it is properly defined.
|
||||||
#define HAVE_STRICMP 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strncasecmp' function. */
|
|
||||||
/* #undef HAVE_STRNCASECMP */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strncmpi' function. */
|
|
||||||
/* #undef HAVE_STRNCMPI */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strnicmp' function. */
|
|
||||||
#define HAVE_STRNICMP 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strchr' function. */
|
|
||||||
#define HAVE_STRCHR 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strcoll' function and it is properly defined.
|
|
||||||
*/
|
*/
|
||||||
#define HAVE_STRCOLL 1
|
#define HAVE_STRCOLL 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strdup' function. */
|
/* Define to 1 if you have the 'strdup' function. */
|
||||||
/* #define HAVE_STRDUP 1*/
|
#define HAVE_STRDUP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strerror' function. */
|
/* Define to 1 if you have the 'strerror' function. */
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'stricmp' function. */
|
||||||
|
#define HAVE_STRICMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
/* #define HAVE_STRINGS_H 1 */
|
/* #define HAVE_STRINGS_H 1 */
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strsignal' function. */
|
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strncmpi' function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strndup' function. */
|
||||||
|
/* #undef HAVE_STRNDUP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strnicmp' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRNICMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strsignal' function. */
|
||||||
/* #undef HAVE_STRSIGNAL */
|
/* #undef HAVE_STRSIGNAL */
|
||||||
|
|
||||||
/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
#define HAVE_ISATTY 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
#define HAVE_TTYNAME 1
|
||||||
|
char *ttyname (int);
|
||||||
|
|
||||||
|
/* Define to 1 if 'n_un.n_name' is a member of 'struct nlist'. */
|
||||||
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'.
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_SYS_DIR_H */
|
/* #undef HAVE_SYS_DIR_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'.
|
||||||
*/
|
*/
|
||||||
/* #undef HAVE_SYS_NDIR_H */
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
/* #define HAVE_SYS_PARAM_H 1 */
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_SYS_PARAM_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||||
/* #undef HAVE_SYS_RESOURCE_H */
|
/* #undef HAVE_SYS_RESOURCE_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
/* #define HAVE_SYS_STAT_H 1 */
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||||
/*#define HAVE_SYS_TIMEB_H 1*/
|
#define HAVE_SYS_TIMEB_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
/*#define HAVE_SYS_TIME_H 1*/
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
/*#define HAVE_SYS_TYPES_H 1*/
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define this if you have the \`union wait' type in <sys/wait.h>. */
|
/* Define to 1 if you have the \'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
/* #define HAVE_UNISTD_H 1*/
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <varargs.h> header file. */
|
/* Define to 1 if you have the 'wait3' function. */
|
||||||
/* #undef HAVE_VARARGS_H */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `vfork' function. */
|
|
||||||
/* #undef HAVE_VFORK */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <vfork.h> header file. */
|
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `vprintf' function. */
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `wait3' function. */
|
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define to 1 if you have the `waitpid' function. */
|
/* Define to 1 if you have the 'waitpid' function. */
|
||||||
/* #undef HAVE_WAITPID */
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
/* Define to 1 if `fork' works. */
|
|
||||||
/* #undef HAVE_WORKING_FORK */
|
|
||||||
|
|
||||||
/* Define to 1 if `vfork' works. */
|
|
||||||
/* #undef HAVE_WORKING_VFORK */
|
|
||||||
|
|
||||||
/* Build host information. */
|
/* Build host information. */
|
||||||
#define MAKE_HOST "Windows32"
|
#define MAKE_HOST "Windows32"
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
/* Define to 1 to enable job server support in GNU make. */
|
||||||
/* #undef MAKE_JOBSERVER */
|
#define MAKE_JOBSERVER 1
|
||||||
|
|
||||||
/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
|
/* Define to 1 to enable 'load' support in GNU make. */
|
||||||
on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
#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 */
|
/* #undef NLIST_NAME_UNION */
|
||||||
|
|
||||||
/* Define if struct nlist.n_name is a pointer rather than an array. */
|
/* Define to 1 if struct nlist.n_name is a pointer rather than an array. */
|
||||||
/* #undef NLIST_STRUCT */
|
/* #undef NLIST_STRUCT */
|
||||||
|
|
||||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
@@ -347,10 +374,22 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Name of this package (needed by automake) */
|
/* Name of this package (needed by automake) */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Define to 1 if the C compiler supports function prototypes. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#define PROTOTYPES 1
|
#define PACKAGE_BUGREPORT "bug-make@gnu.org"
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
/* Define to the full name of this package. */
|
||||||
|
#define PACKAGE_NAME "GNU make"
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#define PACKAGE_URL "http://www.gnu.org/software/make/"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#define PACKAGE_VERSION "%VERSION%"
|
||||||
|
|
||||||
|
/* Define to the character that separates directories in PATH. */
|
||||||
|
#define PATH_SEPARATOR_CHAR ';'
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers ('int' or 'void'). */
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
/* Define to the name of the SCCS 'get' command. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
@@ -359,20 +398,20 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define to 1 if the `setvbuf' function takes the buffering type as its
|
/* Define to 1 if the 'setvbuf' function takes the buffering type as its
|
||||||
second argument and the buffer pointer as the third, as on System V before
|
second argument and the buffer pointer as the third, as on System V before
|
||||||
release 3. */
|
release 3. */
|
||||||
/* #undef SETVBUF_REVERSED */
|
/* #undef SETVBUF_REVERSED */
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
automatically deduced at run-time.
|
automatically deduced at run time.
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
/* #undef STACK_DIRECTION */
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
@@ -385,7 +424,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
/* #define TIME_WITH_SYS_TIME 1 */
|
#ifdef __MINGW32__
|
||||||
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 for Encore UMAX. */
|
/* Define to 1 for Encore UMAX. */
|
||||||
/* #undef UMAX */
|
/* #undef UMAX */
|
||||||
@@ -420,21 +461,18 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
this defined. */
|
this defined. */
|
||||||
/* #undef _POSIX_1_SOURCE */
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
/* Define to 1 if you need to in order for 'stat' and other things to work. */
|
||||||
#define _POSIX_SOURCE 1
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
/* Define to empty if 'const' does not conform to ANSI C. */
|
||||||
/*#define __PROTOTYPES 1*/
|
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
|
||||||
/* #undef const */
|
/* #undef const */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define gid_t int
|
#define gid_t int
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to 'int' if <sys/types.h> does not define. */
|
||||||
/* GCC 4.x reportedly defines pid_t. */
|
/* GCC 4.x reportedly defines pid_t. */
|
||||||
#ifndef _PID_T_
|
#ifndef _PID_T_
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
@@ -444,45 +482,17 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
|
|
||||||
/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
|
/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
|
||||||
|
#if !HAVE_STDINT_H && !HAVE_INTTYPES_H
|
||||||
#define uintmax_t unsigned long
|
#define uintmax_t unsigned long
|
||||||
|
#endif
|
||||||
/* Define as `fork' if `vfork' does not work. */
|
|
||||||
/*#define vfork fork*/
|
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
|
||||||
if <inttypes.h> doesn't define. */
|
|
||||||
#define uintmax_t unsigned long
|
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
|
||||||
#undef HAVE_ST_RDEV
|
|
||||||
#define HAVE_ST_RDEV 1
|
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
|
||||||
#undef HAVE_STRFTIME
|
|
||||||
#define HAVE_STRFTIME 1
|
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
|
||||||
/* #undef HAVE_TM_ZONE */
|
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
|
||||||
tzname. */
|
|
||||||
#undef HAVE_TZNAME
|
|
||||||
#define HAVE_TZNAME 1
|
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
|
||||||
#undef HAVE_UTIME_NULL
|
|
||||||
#define HAVE_UTIME_NULL 1
|
|
||||||
|
|
||||||
/* Define to the installation directory for locales. */
|
/* Define to the installation directory for locales. */
|
||||||
#define LOCALEDIR ""
|
#define LOCALEDIR ""
|
||||||
|
|
||||||
|
|||||||
15
config/.cvsignore → config/.gitignore
vendored
15
config/.cvsignore → config/.gitignore
vendored
@@ -1,11 +1,12 @@
|
|||||||
*.m4
|
ar-lib
|
||||||
config.*
|
|
||||||
mkinstalldirs
|
|
||||||
texinfo.tex
|
|
||||||
mdate-sh
|
|
||||||
compile
|
compile
|
||||||
|
config.guess
|
||||||
|
config.rpath
|
||||||
|
config.sub
|
||||||
depcomp
|
depcomp
|
||||||
install-sh
|
install-sh
|
||||||
|
mdate-sh
|
||||||
missing
|
missing
|
||||||
|
texinfo.tex
|
||||||
Makefile Makefile.in
|
*.m4
|
||||||
|
!dospaths.m4
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2012-01-15 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* dospaths.m4: Use AC_LANG_PROGRAM to encapsulate the test code.
|
||||||
|
Fixes Savannah bug #35256. Patch from Sebastian Pipping.
|
||||||
|
|
||||||
2006-03-09 Paul Smith <psmith@gnu.org>
|
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
||||||
@@ -28,8 +33,7 @@
|
|||||||
* Makefile.am: New file.
|
* Makefile.am: New file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
|
Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*-Makefile-*-, or close enough
|
# -*-Makefile-*-, or close enough
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
# Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -16,9 +15,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 nls.m4 \
|
# Autoconf / automake know how to handle this directory.
|
||||||
intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
|
|
||||||
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
|
||||||
progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 longlong.m4 \
|
|
||||||
dospaths.m4 po.m4 signed.m4 longdouble.m4 wchar_t.m4 \
|
|
||||||
wint_t.m4 intmax.m4 printf-posix.m4 xsize.m4 size_max.m4
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Test if the system uses DOS-style pathnames (drive specs and backslashes)
|
# 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.
|
# By Paul Smith <psmith@gnu.org>. Based on dos.m4 by Jim Meyering.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -18,21 +17,17 @@
|
|||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AC_DEFUN([pds_AC_DOS_PATHS],
|
AC_DEFUN([pds_AC_DOS_PATHS], [
|
||||||
[
|
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths], [
|
||||||
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
[
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__ && !defined __CYGWIN__
|
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__ && !defined __CYGWIN__
|
||||||
neither MSDOS nor Windows nor OS2
|
neither MSDOS nor Windows nor OS2
|
||||||
#endif
|
#endif
|
||||||
],
|
]])],
|
||||||
[ac_cv_dos_paths=yes],
|
[ac_cv_dos_paths=yes],
|
||||||
[ac_cv_dos_paths=no])
|
[ac_cv_dos_paths=no])])
|
||||||
])
|
|
||||||
|
|
||||||
if test x"$ac_cv_dos_paths" = xyes; then
|
AS_IF([test x"$ac_cv_dos_paths" = xyes],
|
||||||
AC_DEFINE_UNQUOTED([HAVE_DOS_PATHS], 1,
|
[ AC_DEFINE_UNQUOTED([HAVE_DOS_PATHS], 1,
|
||||||
[Define if the system uses DOS-style pathnames.])
|
[Define if the system uses DOS-style pathnames.])])
|
||||||
fi
|
])
|
||||||
])
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -25,10 +24,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||||
|
|
||||||
/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||||
# define SYS_SIGLIST_DECLARED 1
|
# define SYS_SIGLIST_DECLARED 1
|
||||||
|
|
||||||
/* Define to 1 if the C library defines the variable `_sys_siglist'. */
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
# define HAVE_DECL_SYS_SIGLIST 1
|
# define HAVE_DECL_SYS_SIGLIST 1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -41,13 +40,13 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define to 1 if you have the fdopen function. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
#define HAVE_FDOPEN 1
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `getgroups' function. */
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
#define HAVE_GETGROUPS 1
|
#define HAVE_GETGROUPS 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
@@ -56,18 +55,18 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the mkstemp function. */
|
/* Define to 1 if you have the mkstemp function. */
|
||||||
#define HAVE_MKSTEMP 1
|
#define HAVE_MKSTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mktemp' function. */
|
/* Define to 1 if you have the 'mktemp' function. */
|
||||||
#define HAVE_MKTEMP 1
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `setlinebuf' function. */
|
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||||
#define HAVE_SETLINEBUF 1
|
#define HAVE_SETLINEBUF 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `setvbuf' function. */
|
/* Define to 1 if you have the 'setvbuf' function. */
|
||||||
#define HAVE_SETVBUF 1
|
#define HAVE_SETVBUF 1
|
||||||
|
|
||||||
#define SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long long
|
#define uintmax_t unsigned long long
|
||||||
|
|
||||||
@@ -77,19 +76,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to 1 if you have the select function. */
|
/* Define to 1 if you have the select function. */
|
||||||
#define HAVE_SELECT 1
|
#define HAVE_SELECT 1
|
||||||
|
|
||||||
/* Define to 1 if your compiler conforms to the ANSI C standard. */
|
|
||||||
#define HAVE_ANSI_COMPILER 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
|
||||||
#define HAVE_STDARG_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the vprintf library function. */
|
|
||||||
#undef HAVE_VPRINTF
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the stricmp function. */
|
/* Define to 1 if you have the stricmp function. */
|
||||||
#define HAVE_STRICMP 1
|
#define HAVE_STRICMP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
|
||||||
/* Name of the package */
|
/* Name of the package */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
@@ -108,8 +100,8 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "%VERSION%"
|
#define PACKAGE_VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to 1 if the C compiler supports function prototypes. */
|
/* Output sync sypport */
|
||||||
#define PROTOTYPES 1
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|||||||
523
configure.ac
Normal file
523
configure.ac
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AC_INIT([GNU make],[4.1.90],[bug-make@gnu.org])
|
||||||
|
|
||||||
|
AC_PREREQ([2.69])
|
||||||
|
|
||||||
|
# Autoconf setup
|
||||||
|
AC_CONFIG_AUX_DIR([config])
|
||||||
|
AC_CONFIG_SRCDIR([vpath.c])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
# Automake setup
|
||||||
|
# We have to enable "foreign" because ChangeLog is auto-generated
|
||||||
|
# We cannot enable -Werror because gettext 0.18.1 has invalid content
|
||||||
|
# When we update gettext to 0.18.3 or better we can add it again.
|
||||||
|
AM_INIT_AUTOMAKE([1.15 foreign -Werror -Wall])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_CHECK_PROG([AR], [ar], [ar], [ar])
|
||||||
|
# Perl is needed for the test suite (only)
|
||||||
|
AC_CHECK_PROG([PERL], [perl], [perl], [perl])
|
||||||
|
|
||||||
|
# Needed for w32/Makefile.am
|
||||||
|
AM_PROG_AR
|
||||||
|
|
||||||
|
# Specialized system macros
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
AC_AIX
|
||||||
|
AC_ISC_POSIX
|
||||||
|
AC_MINIX
|
||||||
|
|
||||||
|
# Enable gettext, in "external" mode.
|
||||||
|
AM_GNU_GETTEXT_VERSION([0.19.4])
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
|
||||||
|
# This test must come as early as possible after the compiler configuration
|
||||||
|
# tests, because the choice of the file model can (in principle) affect
|
||||||
|
# whether functions and headers are available, whether they work, etc.
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
AC_SEARCH_LIBS([getpwnam], [sun])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STAT
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
||||||
|
memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h \
|
||||||
|
sys/select.h])
|
||||||
|
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_SIGNAL
|
||||||
|
AC_TYPE_UID_T
|
||||||
|
AC_TYPE_PID_T
|
||||||
|
AC_TYPE_OFF_T
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
|
AC_TYPE_UINTMAX_T
|
||||||
|
|
||||||
|
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||||
|
|
||||||
|
AC_STRUCT_ST_MTIM_NSEC
|
||||||
|
AC_CACHE_CHECK([whether to use high resolution file timestamps],
|
||||||
|
[make_cv_file_timestamp_hi_res],
|
||||||
|
[ make_cv_file_timestamp_hi_res=no
|
||||||
|
AS_IF([test "$ac_cv_struct_st_mtim_nsec" != no],
|
||||||
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#if HAVE_INTTYPES_H
|
||||||
|
# include <inttypes.h>
|
||||||
|
#endif]],
|
||||||
|
[[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])],
|
||||||
|
[make_cv_file_timestamp_hi_res=yes])
|
||||||
|
])])
|
||||||
|
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes], [val=1], [val=0])
|
||||||
|
AC_DEFINE_UNQUOTED([FILE_TIMESTAMP_HI_RES], [$val],
|
||||||
|
[Use high resolution file timestamps if nonzero.])
|
||||||
|
|
||||||
|
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes],
|
||||||
|
[ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||||
|
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||||
|
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
|
||||||
|
AS_IF([test "$ac_cv_search_clock_gettime" != no],
|
||||||
|
[ AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
|
||||||
|
[Define to 1 if you have the clock_gettime function.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Check for DOS-style pathnames.
|
||||||
|
pds_AC_DOS_PATHS
|
||||||
|
|
||||||
|
# See if we have a standard version of gettimeofday(). Since actual
|
||||||
|
# implementations can differ, just make sure we have the most common
|
||||||
|
# one.
|
||||||
|
AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday],
|
||||||
|
[ac_cv_func_gettimeofday=no
|
||||||
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
||||||
|
exit (gettimeofday (&t, 0) != 0
|
||||||
|
|| t.tv_sec < 0 || t.tv_usec < 0);
|
||||||
|
}]])],
|
||||||
|
[ac_cv_func_gettimeofday=yes],
|
||||||
|
[ac_cv_func_gettimeofday=no],
|
||||||
|
[ac_cv_func_gettimeofday="no (cross-compiling)"])])
|
||||||
|
AS_IF([test "$ac_cv_func_gettimeofday" = yes],
|
||||||
|
[ AC_DEFINE([HAVE_GETTIMEOFDAY], [1],
|
||||||
|
[Define to 1 if you have a standard gettimeofday function])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \
|
||||||
|
dup dup2 getcwd realpath sigsetmask sigaction \
|
||||||
|
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||||
|
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||||
|
lstat readlink atexit isatty ttyname pselect])
|
||||||
|
|
||||||
|
# We need to check declarations, not just existence, because on Tru64 this
|
||||||
|
# function is not declared without special flags, which themselves cause
|
||||||
|
# other problems. We'll just use our own.
|
||||||
|
AC_CHECK_DECLS([bsd_signal], [], [], [[#define _GNU_SOURCE 1
|
||||||
|
#include <signal.h>]])
|
||||||
|
|
||||||
|
AC_FUNC_FORK
|
||||||
|
|
||||||
|
AC_FUNC_SETVBUF_REVERSED
|
||||||
|
|
||||||
|
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
||||||
|
# It doesn't hurt much to use our own if we can't find it so I don't
|
||||||
|
# make the effort here.
|
||||||
|
AC_CHECK_FUNCS([strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp])
|
||||||
|
|
||||||
|
# strcoll() is used by the GNU glob library
|
||||||
|
AC_FUNC_STRCOLL
|
||||||
|
|
||||||
|
AC_FUNC_ALLOCA
|
||||||
|
AC_FUNC_CLOSEDIR_VOID
|
||||||
|
|
||||||
|
# See if the user wants to add (or not) GNU Guile support
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
|
||||||
|
[Support GNU Guile for embedded scripting])])
|
||||||
|
|
||||||
|
# For some strange reason, at least on Ubuntu, each version of Guile
|
||||||
|
# comes with it's own PC file so we have to specify them as individual
|
||||||
|
# packages. Ugh.
|
||||||
|
AS_IF([test "x$with_guile" != xno],
|
||||||
|
[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes],
|
||||||
|
[PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes],
|
||||||
|
[have_guile=no])])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "$have_guile" = yes],
|
||||||
|
[AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes])
|
||||||
|
|
||||||
|
AC_FUNC_GETLOADAVG
|
||||||
|
|
||||||
|
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
||||||
|
# doesn't. So, we will.
|
||||||
|
|
||||||
|
AS_IF([test "$ac_cv_header_nlist_h" = yes],
|
||||||
|
[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
||||||
|
[[struct nlist nl;
|
||||||
|
nl.n_name = "string";
|
||||||
|
return 0;]])],
|
||||||
|
[make_cv_nlist_struct=yes],
|
||||||
|
[make_cv_nlist_struct=no])
|
||||||
|
AS_IF([test "$make_cv_nlist_struct" = yes],
|
||||||
|
[ AC_DEFINE([NLIST_STRUCT], [1],
|
||||||
|
[Define to 1 if struct nlist.n_name is a pointer rather than an array.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>
|
||||||
|
/* NetBSD declares sys_siglist in unistd.h. */
|
||||||
|
#if HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# Check out the wait reality.
|
||||||
|
AC_CHECK_HEADERS([sys/wait.h],[],[],[[#include <sys/types.h>]])
|
||||||
|
AC_CHECK_FUNCS([waitpid wait3])
|
||||||
|
AC_CACHE_CHECK([for union wait], [make_cv_union_wait],
|
||||||
|
[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>]],
|
||||||
|
[[union wait status; int pid; pid = wait (&status);
|
||||||
|
#ifdef WEXITSTATUS
|
||||||
|
/* Some POSIXoid systems have both the new-style macros and the old
|
||||||
|
union wait type, and they do not work together. If union wait
|
||||||
|
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
||||||
|
if (WEXITSTATUS (status) != 0) pid = -1;
|
||||||
|
#ifdef WTERMSIG
|
||||||
|
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
||||||
|
-- blow chunks here --
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WAITPID
|
||||||
|
/* Make sure union wait works with waitpid. */
|
||||||
|
pid = waitpid (-1, &status, 0);
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[make_cv_union_wait=yes],
|
||||||
|
[make_cv_union_wait=no])
|
||||||
|
])
|
||||||
|
AS_IF([test "$make_cv_union_wait" = yes],
|
||||||
|
[ AC_DEFINE([HAVE_UNION_WAIT], [1],
|
||||||
|
[Define to 1 if you have the 'union wait' type in <sys/wait.h>.])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
||||||
|
AS_IF([test "$PATH_SEPARATOR" = ';'],
|
||||||
|
[ AC_DEFINE([HAVE_DOS_PATHS], [1],
|
||||||
|
[Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# See if the user wants to use pmake's "customs" distributed build capability
|
||||||
|
AC_SUBST([REMOTE]) REMOTE=stub
|
||||||
|
use_customs=false
|
||||||
|
AC_ARG_WITH([customs],
|
||||||
|
[AC_HELP_STRING([--with-customs=DIR],
|
||||||
|
[enable remote jobs via Customs--see README.customs])],
|
||||||
|
[ AS_CASE([$withval], [n|no], [:],
|
||||||
|
[make_cppflags="$CPPFLAGS"
|
||||||
|
AS_CASE([$withval],
|
||||||
|
[y|ye|yes], [:],
|
||||||
|
[CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
||||||
|
make_ldflags="$LDFLAGS -L$with_customs/lib"])
|
||||||
|
CF_NETLIBS
|
||||||
|
AC_CHECK_HEADER([customs.h],
|
||||||
|
[use_customs=true
|
||||||
|
REMOTE=cstms
|
||||||
|
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
||||||
|
[with_customs=no
|
||||||
|
CPPFLAGS="$make_cppflags" make_badcust=yes])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Tell automake about this, so it can include the right .c files.
|
||||||
|
AM_CONDITIONAL([USE_CUSTOMS], [test "$use_customs" = true])
|
||||||
|
|
||||||
|
# See if the user asked to handle case insensitive file systems.
|
||||||
|
AH_TEMPLATE([HAVE_CASE_INSENSITIVE_FS], [Use case insensitive file names])
|
||||||
|
AC_ARG_ENABLE([case-insensitive-file-system],
|
||||||
|
AC_HELP_STRING([--enable-case-insensitive-file-system],
|
||||||
|
[assume file systems are case insensitive]),
|
||||||
|
[AS_IF([test "$enableval" = yes], [AC_DEFINE([HAVE_CASE_INSENSITIVE_FS])])])
|
||||||
|
|
||||||
|
# See if we can handle the job server feature, and if the user wants it.
|
||||||
|
AC_ARG_ENABLE([job-server],
|
||||||
|
AC_HELP_STRING([--disable-job-server],
|
||||||
|
[disallow recursive make communication during -jN]),
|
||||||
|
[make_cv_job_server="$enableval" user_job_server="$enableval"],
|
||||||
|
[make_cv_job_server="yes"])
|
||||||
|
|
||||||
|
AS_IF([test "$ac_cv_func_waitpid" = no && test "$ac_cv_func_wait3" = no],
|
||||||
|
[has_wait_nohang=no],
|
||||||
|
[has_wait_nohang=yes])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for SA_RESTART], [make_cv_sa_restart], [
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
|
||||||
|
[[return SA_RESTART;]])],
|
||||||
|
[make_cv_sa_restart=yes],
|
||||||
|
[make_cv_sa_restart=no])])
|
||||||
|
|
||||||
|
AS_IF([test "$make_cv_sa_restart" != no],
|
||||||
|
[ AC_DEFINE([HAVE_SA_RESTART], [1],
|
||||||
|
[Define to 1 if <signal.h> defines the SA_RESTART constant.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Only allow jobserver on systems that support it
|
||||||
|
AS_CASE([/$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/],
|
||||||
|
[*/no/*], [make_cv_job_server=no])
|
||||||
|
|
||||||
|
# Also supported on OS2 and MinGW
|
||||||
|
AS_CASE([$host_os], [os2*|mingw*], [make_cv_job_server=yes])
|
||||||
|
|
||||||
|
# If we support it and the user didn't disable it, build with jobserver
|
||||||
|
AS_CASE([/$make_cv_job_server/$user_job_server/],
|
||||||
|
[*/no/*], [: no jobserver],
|
||||||
|
[AC_DEFINE(MAKE_JOBSERVER, 1,
|
||||||
|
[Define to 1 to enable job server support in GNU make.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# If dl*() functions are supported we can enable the load operation
|
||||||
|
AC_CHECK_DECLS([dlopen, dlsym, dlerror], [], [],
|
||||||
|
[[#include <dlfcn.h>]])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([load],
|
||||||
|
AC_HELP_STRING([--disable-load],
|
||||||
|
[disable support for the 'load' operation]),
|
||||||
|
[make_cv_load="$enableval" user_load="$enableval"],
|
||||||
|
[make_cv_load="yes"])
|
||||||
|
|
||||||
|
AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/],
|
||||||
|
[*/no/*], [make_cv_load=no])
|
||||||
|
|
||||||
|
# We might need -ldl
|
||||||
|
AS_IF([test "$make_cv_load" = yes], [
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_CASE([/$make_cv_load/$user_load/],
|
||||||
|
[*/no/*], [make_cv_load=no],
|
||||||
|
[AC_DEFINE(MAKE_LOAD, 1,
|
||||||
|
[Define to 1 to enable 'load' support in GNU make.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# If we want load support, we might need to link with export-dynamic.
|
||||||
|
# See if we can figure it out. Unfortunately this is very difficult.
|
||||||
|
# For example passing -rdynamic to the SunPRO linker gives a warning
|
||||||
|
# but succeeds and creates a shared object, not an executable!
|
||||||
|
AS_IF([test "$make_cv_load" = yes], [
|
||||||
|
AC_MSG_CHECKING([If the linker accepts -Wl,--export-dynamic])
|
||||||
|
old_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
AC_SUBST([AM_LDFLAGS], [-Wl,--export-dynamic])],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_CHECKING([If the linker accepts -rdynamic])
|
||||||
|
LDFLAGS="$old_LDFLAGS -rdynamic"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
AC_SUBST([AM_LDFLAGS], [-rdynamic])],
|
||||||
|
[AC_MSG_RESULT([no])])
|
||||||
|
])
|
||||||
|
LDFLAGS="$old_LDFLAGS"
|
||||||
|
])
|
||||||
|
|
||||||
|
# if we have both lstat() and readlink() then we can support symlink
|
||||||
|
# timechecks.
|
||||||
|
AS_IF([test "$ac_cv_func_lstat" = yes && test "$ac_cv_func_readlink" = yes],
|
||||||
|
[ AC_DEFINE([MAKE_SYMLINKS], [1],
|
||||||
|
[Define to 1 to enable symbolic link timestamp checking.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Find the SCCS commands, so we can include them in our default rules.
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for location of SCCS get command], [make_cv_path_sccs_get], [
|
||||||
|
AS_IF([test -f /usr/sccs/get],
|
||||||
|
[make_cv_path_sccs_get=/usr/sccs/get],
|
||||||
|
[make_cv_path_sccs_get=get])
|
||||||
|
])
|
||||||
|
AC_DEFINE_UNQUOTED([SCCS_GET], ["$make_cv_path_sccs_get"],
|
||||||
|
[Define to the name of the SCCS 'get' command.])
|
||||||
|
|
||||||
|
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
||||||
|
AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 &&
|
||||||
|
test -f s.conftest],
|
||||||
|
[ # We successfully created an SCCS file.
|
||||||
|
AC_CACHE_CHECK([if SCCS get command understands -G], [make_cv_sys_get_minus_G],
|
||||||
|
[AS_IF([$make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
||||||
|
test -f conftoast],
|
||||||
|
[make_cv_sys_get_minus_G=yes],
|
||||||
|
[make_cv_sys_get_minus_G=no])
|
||||||
|
])
|
||||||
|
AS_IF([test "$make_cv_sys_get_minus_G" = yes],
|
||||||
|
[AC_DEFINE([SCCS_GET_MINUS_G], [1],
|
||||||
|
[Define to 1 if the SCCS 'get' command understands the '-G<file>' option.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
rm -f s.conftest conftoast
|
||||||
|
|
||||||
|
# Check the system to see if it provides GNU glob. If not, use our
|
||||||
|
# local version.
|
||||||
|
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||||
|
[ AC_EGREP_CPP([gnu glob],[
|
||||||
|
#include <features.h>
|
||||||
|
#include <glob.h>
|
||||||
|
#include <fnmatch.h>
|
||||||
|
|
||||||
|
#define GLOB_INTERFACE_VERSION 1
|
||||||
|
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||||
|
# include <gnu-versions.h>
|
||||||
|
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||||
|
gnu glob
|
||||||
|
# endif
|
||||||
|
#endif],
|
||||||
|
[make_cv_sys_gnu_glob=yes],
|
||||||
|
[make_cv_sys_gnu_glob=no])])
|
||||||
|
AS_IF([test "$make_cv_sys_gnu_glob" = no],
|
||||||
|
[ GLOBINC='-I$(srcdir)/glob'
|
||||||
|
GLOBLIB=glob/libglob.a
|
||||||
|
])
|
||||||
|
AC_SUBST([GLOBINC])
|
||||||
|
AC_SUBST([GLOBLIB])
|
||||||
|
|
||||||
|
# Tell automake about this, so it can build the right .c files.
|
||||||
|
AM_CONDITIONAL([USE_LOCAL_GLOB], [test "$make_cv_sys_gnu_glob" = no])
|
||||||
|
|
||||||
|
# Let the makefile know what our build host is
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([MAKE_HOST],["$host"],[Build host information.])
|
||||||
|
MAKE_HOST="$host"
|
||||||
|
AC_SUBST([MAKE_HOST])
|
||||||
|
|
||||||
|
w32_target_env=no
|
||||||
|
AM_CONDITIONAL([WINDOWSENV], [false])
|
||||||
|
|
||||||
|
AS_CASE([$host],
|
||||||
|
[*-*-mingw32],
|
||||||
|
[AM_CONDITIONAL([WINDOWSENV], [true])
|
||||||
|
w32_target_env=yes
|
||||||
|
AC_DEFINE([WINDOWS32], [1], [Use platform specific coding])
|
||||||
|
AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'],
|
||||||
|
[Define to the character that separates directories in PATH.])
|
||||||
|
|
||||||
|
# Include the Maintainer's Makefile section, if it's here.
|
||||||
|
|
||||||
|
MAINT_MAKEFILE=/dev/null
|
||||||
|
AS_IF([test -r "$srcdir/maintMakefile"],
|
||||||
|
[ MAINT_MAKEFILE="$srcdir/maintMakefile"
|
||||||
|
])
|
||||||
|
AC_SUBST_FILE([MAINT_MAKEFILE])
|
||||||
|
|
||||||
|
# Allow building with dmalloc
|
||||||
|
AM_WITH_DMALLOC
|
||||||
|
|
||||||
|
# Forcibly disable SET_MAKE. If it's set it breaks things like the test
|
||||||
|
# scripts, etc.
|
||||||
|
SET_MAKE=
|
||||||
|
|
||||||
|
# Sanity check and inform the user of what we found
|
||||||
|
|
||||||
|
AS_IF([test "x$make_badcust" = xyes], [
|
||||||
|
echo
|
||||||
|
echo "WARNING: --with-customs specified but no customs.h could be found;"
|
||||||
|
echo " disabling Customs support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_CASE([$with_customs],
|
||||||
|
[""|n|no|y|ye|yes], [:],
|
||||||
|
[AS_IF([test -f "$with_customs/lib/libcustoms.a"], [:],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
||||||
|
echo " Customs library. You must build and install Customs"
|
||||||
|
echo " before compiling GNU make."
|
||||||
|
echo
|
||||||
|
])])
|
||||||
|
|
||||||
|
AS_IF([test "x$has_wait_nohang" = xno],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: Your system has neither waitpid() nor wait3()."
|
||||||
|
echo " Without one of these, signal handling is unreliable."
|
||||||
|
echo " You should be aware that running GNU make with -j"
|
||||||
|
echo " could result in erratic behavior."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$make_cv_job_server" = xno && test "x$user_job_server" = xyes],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: Make job server requires a POSIX-ish system that"
|
||||||
|
echo " supports the pipe(), sigaction(), and either"
|
||||||
|
echo " waitpid() or wait3() functions. Your system doesn't"
|
||||||
|
echo " appear to provide one or more of those."
|
||||||
|
echo " Disabling job server support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: 'load' support requires a POSIX-ish system that"
|
||||||
|
echo " supports the dlopen(), dlsym(), and dlerror() functions."
|
||||||
|
echo " Your system doesn't appear to provide one or more of these."
|
||||||
|
echo " Disabling 'load' support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
# Specify what files are to be created.
|
||||||
|
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
|
||||||
|
doc/Makefile w32/Makefile tests/config-flags.pm])
|
||||||
|
|
||||||
|
# OK, do it!
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
|
# We only generate the build.sh if we have a build.sh.in; we won't have
|
||||||
|
# one before we've created a distribution.
|
||||||
|
AS_IF([test -f "$srcdir/build.sh.in"],
|
||||||
|
[ ./config.status --file build.sh
|
||||||
|
chmod +x build.sh
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Local Variables:
|
||||||
|
dnl comment-start: "dnl "
|
||||||
|
dnl comment-end: ""
|
||||||
|
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
||||||
|
dnl compile-command: "make configure config.h.in"
|
||||||
|
dnl End:
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
rem Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
rem 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
rem This file is part of GNU Make.
|
rem This file is part of GNU Make.
|
||||||
rem
|
rem
|
||||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
|||||||
478
configure.in
478
configure.in
@@ -1,478 +0,0 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
||||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
|
||||||
#
|
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 3 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
#
|
|
||||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
# details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along with
|
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
AC_INIT([GNU make],[3.82],[bug-make@gnu.org])
|
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
|
||||||
AC_REVISION([[$Id$]])
|
|
||||||
|
|
||||||
# Autoconf setup
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
|
||||||
AC_CONFIG_SRCDIR(vpath.c)
|
|
||||||
AC_CONFIG_HEADERS(config.h)
|
|
||||||
|
|
||||||
# Automake setup
|
|
||||||
AM_INIT_AUTOMAKE([1.9])
|
|
||||||
|
|
||||||
# Checks for programs.
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_RANLIB
|
|
||||||
AC_PROG_CPP
|
|
||||||
AC_CHECK_PROG(AR, ar, ar, ar)
|
|
||||||
# Perl is needed for the test suite (only)
|
|
||||||
AC_CHECK_PROG(PERL, perl, perl, perl)
|
|
||||||
|
|
||||||
# Specialized system macros
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
AC_AIX
|
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_MINIX
|
|
||||||
|
|
||||||
# Enable gettext, in "external" mode.
|
|
||||||
|
|
||||||
AM_GNU_GETTEXT_VERSION(0.14.1)
|
|
||||||
AM_GNU_GETTEXT([external])
|
|
||||||
|
|
||||||
# This test must come as early as possible after the compiler configuration
|
|
||||||
# tests, because the choice of the file model can (in principle) affect
|
|
||||||
# whether functions and headers are available, whether they work, etc.
|
|
||||||
AC_SYS_LARGEFILE
|
|
||||||
|
|
||||||
# Checks for libraries.
|
|
||||||
AC_SEARCH_LIBS(getpwnam, [sun])
|
|
||||||
|
|
||||||
# Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
AC_HEADER_STAT
|
|
||||||
AC_HEADER_TIME
|
|
||||||
AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
|
||||||
memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h)
|
|
||||||
|
|
||||||
# Set a flag if we have an ANSI C compiler
|
|
||||||
if test "$ac_cv_prog_cc_stdc" != no; then
|
|
||||||
AC_DEFINE(HAVE_ANSI_COMPILER, 1,
|
|
||||||
[Define to 1 if your compiler conforms to the ANSI C standard.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Determine what kind of variadic function calls we support
|
|
||||||
AC_CHECK_HEADERS(stdarg.h varargs.h, break)
|
|
||||||
|
|
||||||
AM_PROG_CC_C_O
|
|
||||||
AC_C_CONST
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_TYPE_UID_T
|
|
||||||
AC_TYPE_PID_T
|
|
||||||
|
|
||||||
# Find some definition for uintmax_t
|
|
||||||
|
|
||||||
AC_CHECK_TYPE(uintmax_t,,[
|
|
||||||
uintmax_t="unsigned long"
|
|
||||||
AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"])
|
|
||||||
AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,
|
|
||||||
[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])])
|
|
||||||
|
|
||||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
|
||||||
|
|
||||||
AC_STRUCT_ST_MTIM_NSEC
|
|
||||||
AC_MSG_CHECKING([whether to use high resolution file timestamps])
|
|
||||||
AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
|
|
||||||
make_cv_file_timestamp_hi_res=no
|
|
||||||
if test "$ac_cv_struct_st_mtim_nsec" != no; then
|
|
||||||
AC_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],
|
|
||||||
[])
|
|
||||||
fi])
|
|
||||||
AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
|
|
||||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|
||||||
val=1
|
|
||||||
else
|
|
||||||
val=0
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED(FILE_TIMESTAMP_HI_RES, $val,
|
|
||||||
[Use high resolution file timestamps if nonzero.])
|
|
||||||
|
|
||||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|
||||||
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
|
||||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
|
||||||
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
|
|
||||||
if test "$ac_cv_search_clock_gettime" != no; then
|
|
||||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
|
|
||||||
[Define to 1 if you have the clock_gettime function.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for DOS-style pathnames.
|
|
||||||
pds_AC_DOS_PATHS
|
|
||||||
|
|
||||||
# See if we have a standard version of gettimeofday(). Since actual
|
|
||||||
# implementations can differ, just make sure we have the most common
|
|
||||||
# one.
|
|
||||||
AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
|
|
||||||
[ac_cv_func_gettimeofday=no
|
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
|
|
||||||
int main ()
|
|
||||||
{
|
|
||||||
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
|
||||||
exit (gettimeofday (&t, 0) != 0
|
|
||||||
|| t.tv_sec < 0 || t.tv_usec < 0);
|
|
||||||
}]])],
|
|
||||||
[ac_cv_func_gettimeofday=yes],
|
|
||||||
[ac_cv_func_gettimeofday=no],
|
|
||||||
[ac_cv_func_gettimeofday="no (cross-compiling)"])])
|
|
||||||
if test "$ac_cv_func_gettimeofday" = yes; then
|
|
||||||
AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
|
|
||||||
[Define to 1 if you have a standard gettimeofday function])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS( strdup strndup mkstemp mktemp fdopen fileno \
|
|
||||||
dup2 getcwd realpath sigsetmask sigaction \
|
|
||||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
|
||||||
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
|
||||||
lstat readlink atexit)
|
|
||||||
|
|
||||||
# We need to check declarations, not just existence, because on Tru64 this
|
|
||||||
# function is not declared without special flags, which themselves cause
|
|
||||||
# other problems. We'll just use our own.
|
|
||||||
AC_CHECK_DECLS([bsd_signal], [], [], [[#include <signal.h>]])
|
|
||||||
|
|
||||||
AC_FUNC_SETVBUF_REVERSED
|
|
||||||
|
|
||||||
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
|
||||||
# It doesn't hurt much to use our own if we can't find it so I don't
|
|
||||||
# make the effort here.
|
|
||||||
AC_CHECK_FUNCS(strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp)
|
|
||||||
|
|
||||||
# strcoll() is used by the GNU glob library
|
|
||||||
AC_FUNC_STRCOLL
|
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
|
||||||
AC_FUNC_FORK([])
|
|
||||||
AC_FUNC_VPRINTF
|
|
||||||
AC_FUNC_CLOSEDIR_VOID
|
|
||||||
|
|
||||||
AC_FUNC_GETLOADAVG
|
|
||||||
|
|
||||||
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
|
||||||
# doesn't. So, we will.
|
|
||||||
|
|
||||||
if test "$ac_cv_header_nlist_h" = yes; then
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
|
||||||
[[struct nlist nl;
|
|
||||||
nl.n_name = "string";
|
|
||||||
return 0;]])],
|
|
||||||
[make_cv_nlist_struct=yes],
|
|
||||||
[make_cv_nlist_struct=no])
|
|
||||||
if test "$make_cv_nlist_struct" = yes; then
|
|
||||||
AC_DEFINE(NLIST_STRUCT, 1,
|
|
||||||
[Define to 1 if struct nlist.n_name is a pointer rather than an array.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
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_MSG_CHECKING(for union wait)
|
|
||||||
AC_CACHE_VAL(make_cv_union_wait, [dnl
|
|
||||||
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])])
|
|
||||||
if test "$make_cv_union_wait" = yes; then
|
|
||||||
AC_DEFINE(HAVE_UNION_WAIT, 1,
|
|
||||||
[Define to 1 if you have the \`union wait' type in <sys/wait.h>.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($make_cv_union_wait)
|
|
||||||
|
|
||||||
|
|
||||||
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
|
||||||
if test "$PATH_SEPARATOR" = ';'; then
|
|
||||||
AC_DEFINE(HAVE_DOS_PATHS, 1,
|
|
||||||
[Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# See if the user wants to use pmake's "customs" distributed build capability
|
|
||||||
|
|
||||||
AC_SUBST(REMOTE) REMOTE=stub
|
|
||||||
use_customs=false
|
|
||||||
AC_ARG_WITH(customs,
|
|
||||||
AC_HELP_STRING([--with-customs=DIR],
|
|
||||||
[enable remote jobs via Customs--see README.customs]),
|
|
||||||
[case $withval in
|
|
||||||
n|no) : ;;
|
|
||||||
*) make_cppflags="$CPPFLAGS"
|
|
||||||
case $withval in
|
|
||||||
y|ye|yes) : ;;
|
|
||||||
*) CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
|
||||||
make_ldflags="$LDFLAGS -L$with_customs/lib" ;;
|
|
||||||
esac
|
|
||||||
CF_NETLIBS
|
|
||||||
AC_CHECK_HEADER(customs.h,
|
|
||||||
[use_customs=true
|
|
||||||
REMOTE=cstms
|
|
||||||
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
|
||||||
[with_customs=no
|
|
||||||
CPPFLAGS="$make_cppflags" make_badcust=yes])
|
|
||||||
;;
|
|
||||||
esac])
|
|
||||||
# Tell automake about this, so it can include the right .c files.
|
|
||||||
AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true)
|
|
||||||
|
|
||||||
# See if the user asked to handle case insensitive file systems.
|
|
||||||
|
|
||||||
AH_TEMPLATE(HAVE_CASE_INSENSITIVE_FS, [Use case insensitive file names])
|
|
||||||
AC_ARG_ENABLE(case-insensitive-file-system,
|
|
||||||
AC_HELP_STRING([--enable-case-insensitive-file-system],
|
|
||||||
[assume file systems are case insensitive]),
|
|
||||||
[case $enableval in
|
|
||||||
yes) AC_DEFINE(HAVE_CASE_INSENSITIVE_FS) ;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# See if we can handle the job server feature, and if the user wants it.
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(job-server,
|
|
||||||
AC_HELP_STRING([--disable-job-server],
|
|
||||||
[disallow recursive make communication during -jN]),
|
|
||||||
[make_cv_job_server="$enableval" user_job_server="$enableval"],
|
|
||||||
[make_cv_job_server="yes"])
|
|
||||||
|
|
||||||
has_wait_nohang=yes
|
|
||||||
case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
|
|
||||||
no/no) has_wait_nohang=no ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
|
|
||||||
[[return SA_RESTART;]])],
|
|
||||||
[make_cv_sa_restart=yes],
|
|
||||||
[make_cv_sa_restart=no])])
|
|
||||||
|
|
||||||
if test "$make_cv_sa_restart" != no; then
|
|
||||||
AC_DEFINE(HAVE_SA_RESTART, 1,
|
|
||||||
[Define to 1 if <signal.h> defines the SA_RESTART constant.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# enable make_cv_sa_restart for OS/2 so that the jobserver will be enabled,
|
|
||||||
# but do it after HAVE_SA_RESTART has been defined.
|
|
||||||
case "$host_os" in
|
|
||||||
os2*) make_cv_sa_restart=yes ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in
|
|
||||||
yes/yes/yes/yes/yes)
|
|
||||||
AC_DEFINE(MAKE_JOBSERVER, 1,
|
|
||||||
[Define to 1 to enable job server support in GNU make.]);;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# if we have both lstat() and readlink() then we can support symlink
|
|
||||||
# timechecks.
|
|
||||||
case "$ac_cv_func_lstat/$ac_cv_func_readlink" in
|
|
||||||
yes/yes)
|
|
||||||
AC_DEFINE(MAKE_SYMLINKS, 1,
|
|
||||||
[Define to 1 to enable symbolic link timestamp checking.]);;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Find the SCCS commands, so we can include them in our default rules.
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
|
|
||||||
if test -f /usr/sccs/get; then
|
|
||||||
make_cv_path_sccs_get=/usr/sccs/get
|
|
||||||
else
|
|
||||||
make_cv_path_sccs_get=get
|
|
||||||
fi])
|
|
||||||
AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"],
|
|
||||||
[Define to the name of the SCCS 'get' command.])
|
|
||||||
|
|
||||||
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
|
||||||
if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
|
|
||||||
test -f s.conftest; then
|
|
||||||
# We successfully created an SCCS file.
|
|
||||||
AC_CACHE_CHECK(if SCCS get command understands -G, make_cv_sys_get_minus_G, [
|
|
||||||
if $make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
|
||||||
test -f conftoast; then
|
|
||||||
make_cv_sys_get_minus_G=yes
|
|
||||||
else
|
|
||||||
make_cv_sys_get_minus_G=no
|
|
||||||
fi])
|
|
||||||
case "$make_cv_sys_get_minus_G" in
|
|
||||||
yes) AC_DEFINE(SCCS_GET_MINUS_G, 1,
|
|
||||||
[Define to 1 if the SCCS 'get' command understands the '-G<file>' option.]);;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
rm -f s.conftest conftoast
|
|
||||||
|
|
||||||
# Check the system to see if it provides GNU glob. If not, use our
|
|
||||||
# local version.
|
|
||||||
AC_MSG_CHECKING(if system libc has GNU glob)
|
|
||||||
AC_CACHE_VAL(make_cv_sys_gnu_glob, [
|
|
||||||
AC_EGREP_CPP(gnu glob,[
|
|
||||||
#include <features.h>
|
|
||||||
#include <glob.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
#define GLOB_INTERFACE_VERSION 1
|
|
||||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
|
||||||
# include <gnu-versions.h>
|
|
||||||
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
|
||||||
gnu glob
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
], [AC_MSG_RESULT(yes)
|
|
||||||
make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
|
|
||||||
make_cv_sys_gnu_glob=no])])
|
|
||||||
if test "$make_cv_sys_gnu_glob" = no; then
|
|
||||||
GLOBINC='-I$(srcdir)/glob'
|
|
||||||
GLOBLIB=glob/libglob.a
|
|
||||||
fi
|
|
||||||
AC_SUBST(GLOBINC)
|
|
||||||
AC_SUBST(GLOBLIB)
|
|
||||||
|
|
||||||
# Tell automake about this, so it can build the right .c files.
|
|
||||||
AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
|
|
||||||
|
|
||||||
# Let the makefile know what our build host is
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.])
|
|
||||||
MAKE_HOST="$host"
|
|
||||||
AC_SUBST(MAKE_HOST)
|
|
||||||
|
|
||||||
w32_target_env=no
|
|
||||||
AM_CONDITIONAL([WINDOWSENV], false)
|
|
||||||
|
|
||||||
case "$host" in
|
|
||||||
*-*-mingw32)
|
|
||||||
AM_CONDITIONAL(WINDOWSENV, true)
|
|
||||||
w32_target_env=yes
|
|
||||||
AC_DEFINE([WINDOWS32], [1], [Use platform specific coding])
|
|
||||||
AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(PATH_SEPARATOR_CHAR,'$PATH_SEPARATOR',[Define to the character that separates directories in PATH.])
|
|
||||||
|
|
||||||
# Include the Maintainer's Makefile section, if it's here.
|
|
||||||
|
|
||||||
MAINT_MAKEFILE=/dev/null
|
|
||||||
if test -r "$srcdir/maintMakefile"; then
|
|
||||||
MAINT_MAKEFILE="$srcdir/maintMakefile"
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
|
|
||||||
case "$make_badcust" in
|
|
||||||
yes) echo
|
|
||||||
echo "WARNING: --with-customs specified but no customs.h could be found;"
|
|
||||||
echo " disabling Customs support."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$with_customs" in
|
|
||||||
""|n|no|y|ye|yes) ;;
|
|
||||||
*) if test -f "$with_customs/lib/libcustoms.a"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
|
||||||
echo " Customs library. You must build and install Customs"
|
|
||||||
echo " before compiling GNU make."
|
|
||||||
echo
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$has_wait_nohang" in
|
|
||||||
no) echo
|
|
||||||
echo "WARNING: Your system has neither waitpid() nor wait3()."
|
|
||||||
echo " Without one of these, signal handling is unreliable."
|
|
||||||
echo " You should be aware that running GNU make with -j"
|
|
||||||
echo " could result in erratic behavior."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$make_cv_job_server/$user_job_server" in
|
|
||||||
no/yes) echo
|
|
||||||
echo "WARNING: Make job server requires a POSIX-ish system that"
|
|
||||||
echo " supports the pipe(), sigaction(), and either"
|
|
||||||
echo " waitpid() or wait3() functions. Your system doesn't"
|
|
||||||
echo " appear to provide one or more of those."
|
|
||||||
echo " Disabling job server support."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Specify what files are to be created.
|
|
||||||
AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile w32/Makefile)
|
|
||||||
|
|
||||||
# OK, do it!
|
|
||||||
|
|
||||||
AC_OUTPUT
|
|
||||||
|
|
||||||
# We only generate the build.sh if we have a build.sh.in; we won't have
|
|
||||||
# one before we've created a distribution.
|
|
||||||
if test -f "$srcdir/build.sh.in"; then
|
|
||||||
./config.status --file build.sh
|
|
||||||
chmod +x build.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
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:
|
|
||||||
3
debug.h
3
debug.h
@@ -1,6 +1,5 @@
|
|||||||
/* Debugging macros and interface.
|
/* Debugging macros and interface.
|
||||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
Copyright (C) 1999-2016 Free Software Foundation, Inc.
|
||||||
2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
278
default.c
278
default.c
@@ -1,7 +1,5 @@
|
|||||||
/* Data base of default implicit rules for GNU Make.
|
/* Data base of default implicit rules for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,7 +14,10 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
@@ -32,14 +33,16 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
|
|
||||||
/* This is the default list of suffixes for suffix rules.
|
/* This is the default list of suffixes for suffix rules.
|
||||||
`.s' must come last, so that a `.o' file will be made from
|
'.s' must come last, so that a '.o' file will be made from
|
||||||
a `.c' or `.p' or ... file rather than from a .s file. */
|
a '.c' or '.p' or ... file rather than from a .s file. */
|
||||||
|
|
||||||
static char default_suffixes[]
|
static char default_suffixes[]
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
/* VMS should include all UNIX/POSIX + some VMS extensions */
|
||||||
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
= ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
|
||||||
.w .ch .cweb .web .com .sh .elc .el";
|
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
||||||
|
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
||||||
|
.web .com .sh .elc .el";
|
||||||
#elif defined(__EMX__)
|
#elif defined(__EMX__)
|
||||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
@@ -52,24 +55,40 @@ static char default_suffixes[]
|
|||||||
|
|
||||||
static struct pspec default_pattern_rules[] =
|
static struct pspec default_pattern_rules[] =
|
||||||
{
|
{
|
||||||
|
#ifdef VMS
|
||||||
{ "(%)", "%",
|
{ "(%)", "%",
|
||||||
"$(AR) $(ARFLAGS) $@ $<" },
|
"@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/"
|
||||||
|
"$(or "
|
||||||
|
"$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@)),"
|
||||||
|
"$(patsubst %,HELP,$(filter %.hlb %.HLB,$@)),"
|
||||||
|
"$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@)),"
|
||||||
|
"$(and "
|
||||||
|
"$(patsubst %,SHARE,$(filter %.olb %.OLB,$@)),"
|
||||||
|
"$(patsubst %,SHARE,$(filter %.exe %.EXE,$<))),"
|
||||||
|
"OBJECT)"
|
||||||
|
" $@\n"
|
||||||
|
"$(AR) $(ARFLAGS) $@ $<" },
|
||||||
|
|
||||||
|
#else
|
||||||
|
{ "(%)", "%",
|
||||||
|
"$(AR) $(ARFLAGS) $@ $<" },
|
||||||
|
#endif
|
||||||
/* The X.out rules are only in BSD's default set because
|
/* The X.out rules are only in BSD's default set because
|
||||||
BSD Make has no null-suffix rules, so `foo.out' and
|
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||||
`foo' are the same thing. */
|
'foo' are the same thing. */
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
{ "%.exe", "%",
|
{ "%.exe", "%",
|
||||||
"copy $< $@" },
|
"$(CP) $< $@" },
|
||||||
#else
|
|
||||||
{ "%.out", "%",
|
|
||||||
"@rm -f $@ \n cp $< $@" },
|
|
||||||
#endif
|
#endif
|
||||||
|
{ "%.out", "%",
|
||||||
|
"@rm -f $@ \n cp $< $@" },
|
||||||
|
|
||||||
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
||||||
{ "%.c", "%.w %.ch",
|
{ "%.c", "%.w %.ch",
|
||||||
"$(CTANGLE) $^ $@" },
|
"$(CTANGLE) $^ $@" },
|
||||||
{ "%.tex", "%.w %.ch",
|
{ "%.tex", "%.w %.ch",
|
||||||
"$(CWEAVE) $^ $@" },
|
"$(CWEAVE) $^ $@" },
|
||||||
|
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
};
|
};
|
||||||
@@ -77,43 +96,82 @@ static struct pspec default_pattern_rules[] =
|
|||||||
static struct pspec default_terminal_rules[] =
|
static struct pspec default_terminal_rules[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
|
||||||
/* RCS. */
|
/* RCS. */
|
||||||
{ "%", "%$$5lv", /* Multinet style */
|
{ "%", "%$$5lv", /* Multinet style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "%_v", /* Normal style */
|
{ "%", "%_v", /* Normal style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "[.rcs]%_v", /* Normal style */
|
{ "%", "[.rcs]%_v", /* Normal style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
|
|
||||||
/* SCCS. */
|
/* SCCS. */
|
||||||
/* ain't no SCCS on vms */
|
/* ain't no SCCS on vms */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* RCS. */
|
/* RCS. */
|
||||||
{ "%", "%,v",
|
{ "%", "%,v",
|
||||||
"$(CHECKOUT,v)" },
|
"$(CHECKOUT,v)" },
|
||||||
{ "%", "RCS/%,v",
|
{ "%", "RCS/%,v",
|
||||||
"$(CHECKOUT,v)" },
|
"$(CHECKOUT,v)" },
|
||||||
{ "%", "RCS/%",
|
{ "%", "RCS/%",
|
||||||
"$(CHECKOUT,v)" },
|
"$(CHECKOUT,v)" },
|
||||||
|
|
||||||
/* SCCS. */
|
/* SCCS. */
|
||||||
{ "%", "s.%",
|
{ "%", "s.%",
|
||||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||||
{ "%", "SCCS/s.%",
|
{ "%", "SCCS/s.%",
|
||||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *default_suffix_rules[] =
|
static const char *default_suffix_rules[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
".o",
|
||||||
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".obj",
|
||||||
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".s",
|
||||||
|
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".S",
|
||||||
|
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".c",
|
||||||
|
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".cc",
|
||||||
|
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".C",
|
||||||
|
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".cpp",
|
||||||
|
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".f",
|
||||||
|
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".m",
|
||||||
|
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".p",
|
||||||
|
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".F",
|
||||||
|
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".r",
|
||||||
|
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".mod",
|
||||||
|
"$(COMPILE.mod) -o $@ -e $@ $^",
|
||||||
|
|
||||||
|
".def.sym",
|
||||||
|
"$(COMPILE.def) -o $@ $<",
|
||||||
|
|
||||||
|
".sh",
|
||||||
|
"copy $< >$@",
|
||||||
|
|
||||||
".obj.exe",
|
".obj.exe",
|
||||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".mar.exe",
|
".mar.exe",
|
||||||
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
|
".s.o",
|
||||||
|
"$(COMPILE.s) -o $@ $<",
|
||||||
".s.exe",
|
".s.exe",
|
||||||
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".c.exe",
|
".c.exe",
|
||||||
@@ -148,6 +206,8 @@ static char *default_suffix_rules[] =
|
|||||||
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
||||||
".c.obj",
|
".c.obj",
|
||||||
"$(COMPILE.c) /obj=$@ $<",
|
"$(COMPILE.c) /obj=$@ $<",
|
||||||
|
".c.o",
|
||||||
|
"$(COMPILE.c) /obj=$@ $<",
|
||||||
".cc.ii",
|
".cc.ii",
|
||||||
"$(COMPILE.cc)/prep /list=$@ $<",
|
"$(COMPILE.cc)/prep /list=$@ $<",
|
||||||
".cc.ss",
|
".cc.ss",
|
||||||
@@ -156,12 +216,20 @@ static char *default_suffix_rules[] =
|
|||||||
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
||||||
".cc.obj",
|
".cc.obj",
|
||||||
"$(COMPILE.cc) /obj=$@ $<",
|
"$(COMPILE.cc) /obj=$@ $<",
|
||||||
|
".cc.o",
|
||||||
|
"$(COMPILE.cc) /obj=$@ $<",
|
||||||
".cxx.obj",
|
".cxx.obj",
|
||||||
"$(COMPILE.cxx) /obj=$@ $<",
|
"$(COMPILE.cxx) /obj=$@ $<",
|
||||||
|
".cxx.o",
|
||||||
|
"$(COMPILE.cxx) /obj=$@ $<",
|
||||||
".for.obj",
|
".for.obj",
|
||||||
"$(COMPILE.for) /obj=$@ $<",
|
"$(COMPILE.for) /obj=$@ $<",
|
||||||
|
".for.o",
|
||||||
|
"$(COMPILE.for) /obj=$@ $<",
|
||||||
".pas.obj",
|
".pas.obj",
|
||||||
"$(COMPILE.pas) /obj=$@ $<",
|
"$(COMPILE.pas) /obj=$@ $<",
|
||||||
|
".pas.o",
|
||||||
|
"$(COMPILE.pas) /obj=$@ $<",
|
||||||
|
|
||||||
".y.c",
|
".y.c",
|
||||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||||
@@ -174,6 +242,27 @@ static char *default_suffix_rules[] =
|
|||||||
".tex.dvi",
|
".tex.dvi",
|
||||||
"$(TEX) $<",
|
"$(TEX) $<",
|
||||||
|
|
||||||
|
".cpp.o",
|
||||||
|
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||||
|
".f.o",
|
||||||
|
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||||
|
".m.o",
|
||||||
|
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||||
|
".p.o",
|
||||||
|
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||||
|
".r.o",
|
||||||
|
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||||
|
".mod.o",
|
||||||
|
"$(COMPILE.mod) -o $@ $<",
|
||||||
|
|
||||||
|
".c.ln",
|
||||||
|
"$(LINT.c) -C$* $<",
|
||||||
|
".y.ln",
|
||||||
|
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||||
|
|
||||||
|
".l.ln",
|
||||||
|
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
||||||
|
|
||||||
#else /* ! VMS */
|
#else /* ! VMS */
|
||||||
|
|
||||||
".o",
|
".o",
|
||||||
@@ -293,13 +382,13 @@ static char *default_suffix_rules[] =
|
|||||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||||
|
|
||||||
".w.c",
|
".w.c",
|
||||||
"$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.p",
|
".web.p",
|
||||||
"$(TANGLE) $<",
|
"$(TANGLE) $<",
|
||||||
|
|
||||||
".w.tex",
|
".w.tex",
|
||||||
"$(CWEAVE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.tex",
|
".web.tex",
|
||||||
"$(WEAVE) $<",
|
"$(WEAVE) $<",
|
||||||
@@ -321,7 +410,8 @@ static const char *default_variables[] =
|
|||||||
#ifdef __VAX
|
#ifdef __VAX
|
||||||
"ARCH", "VAX",
|
"ARCH", "VAX",
|
||||||
#endif
|
#endif
|
||||||
"AR", "library/obj",
|
"AR", "library",
|
||||||
|
"LIBRARY", "library",
|
||||||
"ARFLAGS", "/replace",
|
"ARFLAGS", "/replace",
|
||||||
"AS", "macro",
|
"AS", "macro",
|
||||||
"MACRO", "macro",
|
"MACRO", "macro",
|
||||||
@@ -331,15 +421,21 @@ static const char *default_variables[] =
|
|||||||
"CC", "cc",
|
"CC", "cc",
|
||||||
#endif
|
#endif
|
||||||
"CD", "builtin_cd",
|
"CD", "builtin_cd",
|
||||||
"MAKE", "make",
|
"ECHO", "builtin_echo",
|
||||||
"ECHO", "write sys$$output \"",
|
|
||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
"C++", "gcc/plus",
|
"C++", "gcc/plus",
|
||||||
"CXX", "gcc/plus",
|
"CXX", "gcc/plus",
|
||||||
#else
|
#else
|
||||||
"C++", "cxx",
|
"C++", "cxx",
|
||||||
"CXX", "cxx",
|
"CXX", "cxx",
|
||||||
|
#ifndef __ia64
|
||||||
"CXXLD", "cxxlink",
|
"CXXLD", "cxxlink",
|
||||||
|
"CXXLINK", "cxxlink",
|
||||||
|
#else
|
||||||
|
/* CXXLINK is not used on VMS/IA64 */
|
||||||
|
"CXXLD", "link",
|
||||||
|
"CXXLINK", "link",
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
"CO", "co",
|
"CO", "co",
|
||||||
"CPP", "$(CC) /preprocess_only",
|
"CPP", "$(CC) /preprocess_only",
|
||||||
@@ -375,23 +471,49 @@ static const char *default_variables[] =
|
|||||||
"LDLIBS", "",
|
"LDLIBS", "",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
"LINK.o", "$(LD) $(LDFLAGS)",
|
||||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||||
#ifndef GCC_IS_NATIVE
|
#ifndef GCC_IS_NATIVE
|
||||||
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||||
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
#endif
|
#endif
|
||||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.C", "$(COMPILE.cc)",
|
||||||
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||||
|
"LINK.C", "$(LINK.cc)",
|
||||||
|
"LINK.cpp", "$(LINK.cc)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||||
|
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||||
|
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||||
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
||||||
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||||
|
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||||
|
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
||||||
|
"PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
|
||||||
|
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
||||||
|
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
|
||||||
"MV", "rename/new_version",
|
"MV", "rename/new_version",
|
||||||
"CP", "copy",
|
"CP", "copy",
|
||||||
|
".LIBPATTERNS", "%.olb lib%.a",
|
||||||
|
|
||||||
#else /* !VMS */
|
#else /* !VMS */
|
||||||
|
|
||||||
@@ -401,7 +523,7 @@ static const char *default_variables[] =
|
|||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
"CC", "gcc",
|
"CC", "gcc",
|
||||||
# ifdef __MSDOS__
|
# ifdef __MSDOS__
|
||||||
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
||||||
# else
|
# else
|
||||||
"CXX", "gcc",
|
"CXX", "gcc",
|
||||||
# endif /* __MSDOS__ */
|
# endif /* __MSDOS__ */
|
||||||
@@ -419,17 +541,17 @@ static const char *default_variables[] =
|
|||||||
"COFLAGS", "",
|
"COFLAGS", "",
|
||||||
|
|
||||||
"CPP", "$(CC) -E",
|
"CPP", "$(CC) -E",
|
||||||
#ifdef CRAY
|
#ifdef CRAY
|
||||||
"CF77PPFLAGS", "-P",
|
"CF77PPFLAGS", "-P",
|
||||||
"CF77PP", "/lib/cpp",
|
"CF77PP", "/lib/cpp",
|
||||||
"CFT", "cft77",
|
"CFT", "cft77",
|
||||||
"CF", "cf77",
|
"CF", "cf77",
|
||||||
"FC", "$(CF)",
|
"FC", "$(CF)",
|
||||||
#else /* Not CRAY. */
|
#else /* Not CRAY. */
|
||||||
#ifdef _IBMR2
|
#ifdef _IBMR2
|
||||||
"FC", "xlf",
|
"FC", "xlf",
|
||||||
#else
|
#else
|
||||||
#ifdef __convex__
|
#ifdef __convex__
|
||||||
"FC", "fc",
|
"FC", "fc",
|
||||||
#else
|
#else
|
||||||
"FC", "f77",
|
"FC", "f77",
|
||||||
@@ -439,7 +561,7 @@ static const char *default_variables[] =
|
|||||||
However, there is no way to make implicit rules use them and FC. */
|
However, there is no way to make implicit rules use them and FC. */
|
||||||
"F77", "$(FC)",
|
"F77", "$(FC)",
|
||||||
"F77FLAGS", "$(FFLAGS)",
|
"F77FLAGS", "$(FFLAGS)",
|
||||||
#endif /* Cray. */
|
#endif /* Cray. */
|
||||||
"GET", SCCS_GET,
|
"GET", SCCS_GET,
|
||||||
"LD", "ld",
|
"LD", "ld",
|
||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
@@ -449,20 +571,20 @@ static const char *default_variables[] =
|
|||||||
#endif
|
#endif
|
||||||
"LINT", "lint",
|
"LINT", "lint",
|
||||||
"M2C", "m2c",
|
"M2C", "m2c",
|
||||||
#ifdef pyr
|
#ifdef pyr
|
||||||
"PC", "pascal",
|
"PC", "pascal",
|
||||||
#else
|
#else
|
||||||
#ifdef CRAY
|
#ifdef CRAY
|
||||||
"PC", "PASCAL",
|
"PC", "PASCAL",
|
||||||
"SEGLDR", "segldr",
|
"SEGLDR", "segldr",
|
||||||
#else
|
#else
|
||||||
"PC", "pc",
|
"PC", "pc",
|
||||||
#endif /* CRAY. */
|
#endif /* CRAY. */
|
||||||
#endif /* pyr. */
|
#endif /* pyr. */
|
||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
"YACC", "bison -y",
|
"YACC", "bison -y",
|
||||||
#else
|
#else
|
||||||
"YACC", "yacc", /* Or "bison -y" */
|
"YACC", "yacc", /* Or "bison -y" */
|
||||||
#endif
|
#endif
|
||||||
"MAKEINFO", "makeinfo",
|
"MAKEINFO", "makeinfo",
|
||||||
"TEX", "tex",
|
"TEX", "tex",
|
||||||
@@ -480,10 +602,21 @@ static const char *default_variables[] =
|
|||||||
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||||
|
/* On case-insensitive filesystems, treat *.C files as *.c files,
|
||||||
|
to avoid erroneously compiling C sources as C++, which will
|
||||||
|
probably fail. */
|
||||||
"COMPILE.C", "$(COMPILE.cc)",
|
"COMPILE.C", "$(COMPILE.cc)",
|
||||||
|
#else
|
||||||
|
"COMPILE.C", "$(COMPILE.c)",
|
||||||
|
#endif
|
||||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||||
"LINK.C", "$(LINK.cc)",
|
"LINK.C", "$(LINK.cc)",
|
||||||
|
#else
|
||||||
|
"LINK.C", "$(LINK.c)",
|
||||||
|
#endif
|
||||||
"LINK.cpp", "$(LINK.cc)",
|
"LINK.cpp", "$(LINK.cc)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||||
@@ -508,25 +641,29 @@ static const char *default_variables[] =
|
|||||||
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
|
||||||
#ifndef NO_MINUS_C_MINUS_O
|
#ifndef NO_MINUS_C_MINUS_O
|
||||||
"OUTPUT_OPTION", "-o $@",
|
"OUTPUT_OPTION", "-o $@",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SCCS_GET_MINUS_G
|
#ifdef SCCS_GET_MINUS_G
|
||||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AMIGA
|
#if defined(_AMIGA)
|
||||||
".LIBPATTERNS", "%.lib",
|
".LIBPATTERNS", "%.lib",
|
||||||
#else
|
#elif defined(__MSDOS__)
|
||||||
#ifdef __MSDOS__
|
|
||||||
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
".LIBPATTERNS", "lib%.dylib lib%.a",
|
||||||
|
#elif defined(__CYGWIN__) || defined(WINDOWS32)
|
||||||
|
".LIBPATTERNS", "lib%.dll.a %.dll.a lib%.a %.lib lib%.dll %.dll",
|
||||||
#else
|
#else
|
||||||
".LIBPATTERNS", "lib%.so lib%.a",
|
".LIBPATTERNS", "lib%.so lib%.a",
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
|
/* Make this assignment to avoid undefined variable warnings. */
|
||||||
|
"GNUMAKEFLAGS", "",
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -536,15 +673,19 @@ void
|
|||||||
set_default_suffixes (void)
|
set_default_suffixes (void)
|
||||||
{
|
{
|
||||||
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
||||||
|
suffix_file->builtin = 1;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *p = default_suffixes;
|
struct dep *d;
|
||||||
suffix_file->deps = enter_prereqs(PARSE_FILE_SEQ (&p, struct dep, '\0',
|
const char *p = default_suffixes;
|
||||||
NULL, 0),
|
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
|
||||||
NULL);
|
NULL);
|
||||||
|
for (d = suffix_file->deps; d; d = d->next)
|
||||||
|
d->file->builtin = 1;
|
||||||
|
|
||||||
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -557,7 +698,7 @@ set_default_suffixes (void)
|
|||||||
void
|
void
|
||||||
install_default_suffix_rules (void)
|
install_default_suffix_rules (void)
|
||||||
{
|
{
|
||||||
char **s;
|
const char **s;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
return;
|
return;
|
||||||
@@ -565,14 +706,14 @@ install_default_suffix_rules (void)
|
|||||||
for (s = default_suffix_rules; *s != 0; s += 2)
|
for (s = default_suffix_rules; *s != 0; s += 2)
|
||||||
{
|
{
|
||||||
struct file *f = enter_file (strcache_add (s[0]));
|
struct file *f = enter_file (strcache_add (s[0]));
|
||||||
/* Don't clobber cmds given in a makefile if there were any. */
|
/* This function should run before any makefile is parsed. */
|
||||||
if (f->cmds == 0)
|
assert (f->cmds == 0);
|
||||||
{
|
f->cmds = xmalloc (sizeof (struct commands));
|
||||||
f->cmds = xmalloc (sizeof (struct commands));
|
f->cmds->fileinfo.filenm = 0;
|
||||||
f->cmds->fileinfo.filenm = 0;
|
f->cmds->commands = xstrdup (s[1]);
|
||||||
f->cmds->commands = s[1];
|
f->cmds->command_lines = 0;
|
||||||
f->cmds->command_lines = 0;
|
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
||||||
}
|
f->builtin = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,3 +746,12 @@ define_default_variables (void)
|
|||||||
for (s = default_variables; *s != 0; s += 2)
|
for (s = default_variables; *s != 0; s += 2)
|
||||||
define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
undefine_default_variables (void)
|
||||||
|
{
|
||||||
|
const char **s;
|
||||||
|
|
||||||
|
for (s = default_variables; *s != 0; s += 2)
|
||||||
|
undefine_variable_global (s[0], strlen (s[0]), o_default);
|
||||||
|
}
|
||||||
|
|||||||
140
dep.h
140
dep.h
@@ -1,7 +1,5 @@
|
|||||||
/* Definitions of dependency data structures for GNU Make.
|
/* Definitions of dependency data structures for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,61 +14,77 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Flag bits for the second argument to `read_makefile'.
|
|
||||||
These flags are saved in the `changed' field of each
|
|
||||||
`struct dep' in the chain returned by `read_all_makefiles'. */
|
|
||||||
|
|
||||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
|
||||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
|
||||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
|
||||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
|
||||||
#define RM_NOFLAG 0
|
|
||||||
|
|
||||||
/* Structure representing one dependency of a file.
|
|
||||||
Each struct file's `deps' points to a chain of these,
|
|
||||||
chained through the `next'. `stem' is the stem for this
|
|
||||||
dep line of static pattern rule or NULL.
|
|
||||||
|
|
||||||
Note that the first two words of this match a struct nameseq. */
|
|
||||||
|
|
||||||
struct dep
|
|
||||||
{
|
|
||||||
struct dep *next;
|
|
||||||
const char *name;
|
|
||||||
const char *stem;
|
|
||||||
struct file *file;
|
|
||||||
unsigned int changed : 8;
|
|
||||||
unsigned int ignore_mtime : 1;
|
|
||||||
unsigned int staticpattern : 1;
|
|
||||||
unsigned int need_2nd_expansion : 1;
|
|
||||||
unsigned int dontcare : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Structure used in chains of names, for parsing and globbing. */
|
/* Structure used in chains of names, for parsing and globbing. */
|
||||||
|
|
||||||
|
#define NAMESEQ(_t) \
|
||||||
|
_t *next; \
|
||||||
|
const char *name
|
||||||
|
|
||||||
struct nameseq
|
struct nameseq
|
||||||
{
|
{
|
||||||
struct nameseq *next;
|
NAMESEQ (struct nameseq);
|
||||||
const char *name;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 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 PARSEFS_NONE (0x0000)
|
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||||
#define PARSEFS_NOSTRIP (0x0001)
|
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||||
#define PARSEFS_NOAR (0x0002)
|
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||||
#define PARSEFS_NOGLOB (0x0004)
|
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||||
#define PARSEFS_EXISTS (0x0008)
|
#define RM_NOFLAG 0
|
||||||
#define PARSEFS_NOCACHE (0x0010)
|
|
||||||
|
/* Structure representing one dependency of a file.
|
||||||
|
Each struct file's 'deps' points to a chain of these, through 'next'.
|
||||||
|
'stem' is the stem for this dep line of static pattern rule or NULL. */
|
||||||
|
|
||||||
|
#define DEP(_t) \
|
||||||
|
NAMESEQ (_t); \
|
||||||
|
struct file *file; \
|
||||||
|
const char *stem; \
|
||||||
|
unsigned short flags : 8; \
|
||||||
|
unsigned short changed : 1; \
|
||||||
|
unsigned short ignore_mtime : 1; \
|
||||||
|
unsigned short staticpattern : 1; \
|
||||||
|
unsigned short need_2nd_expansion : 1
|
||||||
|
|
||||||
|
struct dep
|
||||||
|
{
|
||||||
|
DEP (struct dep);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Structure representing one goal.
|
||||||
|
The goals to be built constitute a chain of these, chained through 'next'.
|
||||||
|
'stem' is not used, but it's simpler to include and ignore it. */
|
||||||
|
|
||||||
|
struct goaldep
|
||||||
|
{
|
||||||
|
DEP (struct goaldep);
|
||||||
|
unsigned short error;
|
||||||
|
gmk_floc floc;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Options for parsing lists of filenames. */
|
||||||
|
|
||||||
|
#define PARSEFS_NONE 0x0000
|
||||||
|
#define PARSEFS_NOSTRIP 0x0001
|
||||||
|
#define PARSEFS_NOAR 0x0002
|
||||||
|
#define PARSEFS_NOGLOB 0x0004
|
||||||
|
#define PARSEFS_EXISTS 0x0008
|
||||||
|
#define PARSEFS_NOCACHE 0x0010
|
||||||
|
|
||||||
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||||
(_t *)parse_file_seq ((_s),sizeof (_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
|
#ifdef VMS
|
||||||
void *parse_file_seq ();
|
void *parse_file_seq ();
|
||||||
#else
|
#else
|
||||||
void *parse_file_seq (char **stringp, unsigned int size,
|
void *parse_file_seq (char **stringp, unsigned int size,
|
||||||
int stopchar, const char *prefix, int flags);
|
int stopmap, const char *prefix, int flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *tilde_expand (const char *name);
|
char *tilde_expand (const char *name);
|
||||||
@@ -79,15 +93,39 @@ char *tilde_expand (const char *name);
|
|||||||
struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size);
|
struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
#define dep_name(d) ((d)->name ? (d)->name : (d)->file->name)
|
||||||
|
|
||||||
#define alloc_dep() (xcalloc (sizeof (struct dep)))
|
#define alloc_seq_elt(_t) xcalloc (sizeof (_t))
|
||||||
#define free_ns(_n) free (_n)
|
void free_ns_chain (struct nameseq *n);
|
||||||
#define free_dep(_d) free_ns (_d)
|
|
||||||
|
#if defined(MAKE_MAINTAINER_MODE) && defined(__GNUC__)
|
||||||
|
/* Use inline to get real type-checking. */
|
||||||
|
#define SI static inline
|
||||||
|
SI struct nameseq *alloc_ns() { return alloc_seq_elt (struct nameseq); }
|
||||||
|
SI struct dep *alloc_dep() { return alloc_seq_elt (struct dep); }
|
||||||
|
SI struct goaldep *alloc_goaldep() { return alloc_seq_elt (struct goaldep); }
|
||||||
|
|
||||||
|
SI void free_ns(struct nameseq *n) { free (n); }
|
||||||
|
SI void free_dep(struct dep *d) { free_ns ((struct nameseq *)d); }
|
||||||
|
SI void free_goaldep(struct goaldep *g) { free_dep ((struct dep *)g); }
|
||||||
|
|
||||||
|
SI void free_dep_chain(struct dep *d) { free_ns_chain((struct nameseq *)d); }
|
||||||
|
SI void free_goal_chain(struct goaldep *g) { free_dep_chain((struct dep *)g); }
|
||||||
|
#else
|
||||||
|
# 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 dep *copy_dep_chain (const struct dep *d);
|
||||||
void free_dep_chain (struct dep *d);
|
|
||||||
void free_ns_chain (struct nameseq *n);
|
struct goaldep *read_all_makefiles (const char **makefiles);
|
||||||
struct dep *read_all_makefiles (const char **makefiles);
|
void eval_buffer (char *buffer, const gmk_floc *floc);
|
||||||
void eval_buffer (char *buffer);
|
enum update_status update_goal_chain (struct goaldep *goals);
|
||||||
int update_goal_chain (struct dep *goals);
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
Makefile Makefile.in
|
|
||||||
version.texi fdl.texi make-stds.texi texinfo.tex
|
|
||||||
make.info*
|
|
||||||
make*.html
|
|
||||||
make.aux make.cp make.cps make.fn make.fns make.ky
|
|
||||||
make.pg make.toc make.tp make.vr make.log
|
|
||||||
make.dvi make.ps make.pdf
|
|
||||||
stamp-vti
|
|
||||||
22
doc/.gitignore
vendored
Normal file
22
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
manual/
|
||||||
|
gendocs_template
|
||||||
|
fdl.texi
|
||||||
|
make-stds.texi
|
||||||
|
stamp-vti
|
||||||
|
version.texi
|
||||||
|
make.info*
|
||||||
|
make*.html
|
||||||
|
make.aux
|
||||||
|
make.cp
|
||||||
|
make.cps
|
||||||
|
make.dvi
|
||||||
|
make.fn
|
||||||
|
make.fns
|
||||||
|
make.ky
|
||||||
|
make.log
|
||||||
|
make.pdf
|
||||||
|
make.pg
|
||||||
|
make.ps
|
||||||
|
make.toc
|
||||||
|
make.tp
|
||||||
|
make.vr
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*-Makefile-*-, or close enough
|
# -*-Makefile-*-, or close enough
|
||||||
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
# Copyright (C) 2000-2016 Free Software Foundation, Inc.
|
||||||
# 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -23,14 +22,3 @@ info_TEXINFOS = make.texi
|
|||||||
make_TEXINFOS = fdl.texi make-stds.texi
|
make_TEXINFOS = fdl.texi make-stds.texi
|
||||||
|
|
||||||
CLEANFILES = make*.html
|
CLEANFILES = make*.html
|
||||||
|
|
||||||
## ----------------------------- ##
|
|
||||||
## Other documentation formats. ##
|
|
||||||
## ----------------------------- ##
|
|
||||||
|
|
||||||
html: make_1.html
|
|
||||||
|
|
||||||
make_1.html: $(info_TEXINFOS) $(make_TEXINFOS)
|
|
||||||
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/make.texi
|
|
||||||
|
|
||||||
.PHONY: html
|
|
||||||
|
|||||||
2045
doc/make.texi
2045
doc/make.texi
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
rem Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
rem 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
rem This file is part of GNU Make.
|
rem This file is part of GNU Make.
|
||||||
rem
|
rem
|
||||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -21,6 +20,7 @@ echo Building Make for MSDOS
|
|||||||
rem Echo ON so they will see what is going on.
|
rem Echo ON so they will see what is going on.
|
||||||
@echo on
|
@echo on
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g output.c -o output.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
||||||
@@ -52,9 +52,11 @@ ar rv libglob.a glob.o fnmatch.o
|
|||||||
@echo off
|
@echo off
|
||||||
cd ..
|
cd ..
|
||||||
echo commands.o > respf.$$$
|
echo commands.o > respf.$$$
|
||||||
for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||||
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||||
echo glob/libglob.a >> respf.$$$
|
echo glob/libglob.a >> respf.$$$
|
||||||
|
rem gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g guile.c -o guile.o
|
||||||
|
rem echo guile.o >> respf.$$$
|
||||||
@echo Linking...
|
@echo Linking...
|
||||||
@echo on
|
@echo on
|
||||||
gcc -o make.new @respf.$$$
|
gcc -o make.new @respf.$$$
|
||||||
|
|||||||
294
expand.c
294
expand.c
@@ -1,7 +1,5 @@
|
|||||||
/* Variable expansion functions for GNU Make.
|
/* Variable expansion functions for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,7 +14,7 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@@ -28,7 +26,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* Initially, any errors reported when expanding strings will be reported
|
/* Initially, any errors reported when expanding strings will be reported
|
||||||
against the file where the error appears. */
|
against the file where the error appears. */
|
||||||
const struct floc **expanding_var = &reading_file;
|
const gmk_floc **expanding_var = &reading_file;
|
||||||
|
|
||||||
/* The next two describe the variable output buffer.
|
/* The next two describe the variable output buffer.
|
||||||
This buffer is used to hold the variable-expansion of a line of the
|
This buffer is used to hold the variable-expansion of a line of the
|
||||||
@@ -63,8 +61,8 @@ variable_buffer_output (char *ptr, const char *string, unsigned int length)
|
|||||||
{
|
{
|
||||||
unsigned int offset = ptr - variable_buffer;
|
unsigned int offset = ptr - variable_buffer;
|
||||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||||
? newlen + 100
|
? newlen + 100
|
||||||
: 2 * variable_buffer_length);
|
: 2 * variable_buffer_length);
|
||||||
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
||||||
ptr = variable_buffer + offset;
|
ptr = variable_buffer + offset;
|
||||||
}
|
}
|
||||||
@@ -98,8 +96,8 @@ char *
|
|||||||
recursively_expand_for_file (struct variable *v, struct file *file)
|
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
const struct floc *this_var;
|
const gmk_floc *this_var;
|
||||||
const struct floc **saved_varp;
|
const gmk_floc **saved_varp;
|
||||||
struct variable_set_list *save = 0;
|
struct variable_set_list *save = 0;
|
||||||
int set_reading = 0;
|
int set_reading = 0;
|
||||||
|
|
||||||
@@ -123,9 +121,9 @@ recursively_expand_for_file (struct variable *v, struct file *file)
|
|||||||
{
|
{
|
||||||
if (!v->exp_count)
|
if (!v->exp_count)
|
||||||
/* Expanding V causes infinite recursion. Lose. */
|
/* Expanding V causes infinite recursion. Lose. */
|
||||||
fatal (*expanding_var,
|
OS (fatal, *expanding_var,
|
||||||
_("Recursive variable `%s' references itself (eventually)"),
|
_("Recursive variable '%s' references itself (eventually)"),
|
||||||
v->name);
|
v->name);
|
||||||
--v->exp_count;
|
--v->exp_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +185,7 @@ reference_variable (char *o, const char *name, unsigned int length)
|
|||||||
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
||||||
a null byte is found.
|
a null byte is found.
|
||||||
|
|
||||||
Write the results to LINE, which must point into `variable_buffer'. If
|
Write the results to LINE, which must point into 'variable_buffer'. If
|
||||||
LINE is NULL, start at the beginning of the buffer.
|
LINE is NULL, start at the beginning of the buffer.
|
||||||
Return a pointer to LINE, or to the beginning of the buffer if LINE is
|
Return a pointer to LINE, or to the beginning of the buffer if LINE is
|
||||||
NULL.
|
NULL.
|
||||||
@@ -197,12 +195,12 @@ variable_expand_string (char *line, const char *string, long length)
|
|||||||
{
|
{
|
||||||
struct variable *v;
|
struct variable *v;
|
||||||
const char *p, *p1;
|
const char *p, *p1;
|
||||||
char *abuf = NULL;
|
char *save;
|
||||||
char *o;
|
char *o;
|
||||||
unsigned int line_offset;
|
unsigned int line_offset;
|
||||||
|
|
||||||
if (!line)
|
if (!line)
|
||||||
line = initialize_variable_output();
|
line = initialize_variable_output ();
|
||||||
o = line;
|
o = line;
|
||||||
line_offset = line - variable_buffer;
|
line_offset = line - variable_buffer;
|
||||||
|
|
||||||
@@ -212,133 +210,128 @@ variable_expand_string (char *line, const char *string, long length)
|
|||||||
return (variable_buffer);
|
return (variable_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we want a subset of the string, allocate a temporary buffer for it.
|
/* We need a copy of STRING: due to eval, it's possible that it will get
|
||||||
Most of the functions we use here don't work with length limits. */
|
freed as we process it (it might be the value of a variable that's reset
|
||||||
if (length > 0 && string[length] != '\0')
|
for example). Also having a nil-terminated string is handy. */
|
||||||
{
|
save = length < 0 ? xstrdup (string) : xstrndup (string, length);
|
||||||
abuf = xmalloc(length+1);
|
p = save;
|
||||||
memcpy(abuf, string, length);
|
|
||||||
abuf[length] = '\0';
|
|
||||||
string = abuf;
|
|
||||||
}
|
|
||||||
p = string;
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* Copy all following uninteresting chars all at once to the
|
/* Copy all following uninteresting chars all at once to the
|
||||||
variable output buffer, and skip them. Uninteresting chars end
|
variable output buffer, and skip them. Uninteresting chars end
|
||||||
at the next $ or the end of the input. */
|
at the next $ or the end of the input. */
|
||||||
|
|
||||||
p1 = strchr (p, '$');
|
p1 = strchr (p, '$');
|
||||||
|
|
||||||
o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
|
o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
|
||||||
|
|
||||||
if (p1 == 0)
|
if (p1 == 0)
|
||||||
break;
|
break;
|
||||||
p = p1 + 1;
|
p = p1 + 1;
|
||||||
|
|
||||||
/* Dispatch on the char that follows the $. */
|
/* Dispatch on the char that follows the $. */
|
||||||
|
|
||||||
switch (*p)
|
switch (*p)
|
||||||
{
|
{
|
||||||
case '$':
|
case '$':
|
||||||
/* $$ seen means output one $ to the variable output buffer. */
|
case '\0':
|
||||||
o = variable_buffer_output (o, p, 1);
|
/* $$ or $ at the end of the string means output one $ to the
|
||||||
break;
|
variable output buffer. */
|
||||||
|
o = variable_buffer_output (o, p1, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
case '(':
|
case '(':
|
||||||
case '{':
|
case '{':
|
||||||
/* $(...) or ${...} is the general case of substitution. */
|
/* $(...) or ${...} is the general case of substitution. */
|
||||||
{
|
{
|
||||||
char openparen = *p;
|
char openparen = *p;
|
||||||
char closeparen = (openparen == '(') ? ')' : '}';
|
char closeparen = (openparen == '(') ? ')' : '}';
|
||||||
const char *begp;
|
const char *begp;
|
||||||
const char *beg = p + 1;
|
const char *beg = p + 1;
|
||||||
char *op;
|
char *op;
|
||||||
char *abeg = NULL;
|
char *abeg = NULL;
|
||||||
const char *end, *colon;
|
const char *end, *colon;
|
||||||
|
|
||||||
op = o;
|
op = o;
|
||||||
begp = p;
|
begp = p;
|
||||||
if (handle_function (&op, &begp))
|
if (handle_function (&op, &begp))
|
||||||
{
|
{
|
||||||
o = op;
|
o = op;
|
||||||
p = begp;
|
p = begp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is there a variable reference inside the parens or braces?
|
/* Is there a variable reference inside the parens or braces?
|
||||||
If so, expand it before expanding the entire reference. */
|
If so, expand it before expanding the entire reference. */
|
||||||
|
|
||||||
end = strchr (beg, closeparen);
|
end = strchr (beg, closeparen);
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
/* Unterminated variable reference. */
|
/* Unterminated variable reference. */
|
||||||
fatal (*expanding_var, _("unterminated variable reference"));
|
O (fatal, *expanding_var, _("unterminated variable reference"));
|
||||||
p1 = lindex (beg, end, '$');
|
p1 = lindex (beg, end, '$');
|
||||||
if (p1 != 0)
|
if (p1 != 0)
|
||||||
{
|
{
|
||||||
/* BEG now points past the opening paren or brace.
|
/* BEG now points past the opening paren or brace.
|
||||||
Count parens or braces until it is matched. */
|
Count parens or braces until it is matched. */
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (p = beg; *p != '\0'; ++p)
|
for (p = beg; *p != '\0'; ++p)
|
||||||
{
|
{
|
||||||
if (*p == openparen)
|
if (*p == openparen)
|
||||||
++count;
|
++count;
|
||||||
else if (*p == closeparen && --count < 0)
|
else if (*p == closeparen && --count < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* If COUNT is >= 0, there were unmatched opening parens
|
/* If COUNT is >= 0, there were unmatched opening parens
|
||||||
or braces, so we go to the simple case of a variable name
|
or braces, so we go to the simple case of a variable name
|
||||||
such as `$($(a)'. */
|
such as '$($(a)'. */
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
{
|
{
|
||||||
abeg = expand_argument (beg, p); /* Expand the name. */
|
abeg = expand_argument (beg, p); /* Expand the name. */
|
||||||
beg = abeg;
|
beg = abeg;
|
||||||
end = strchr (beg, '\0');
|
end = strchr (beg, '\0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Advance P to the end of this reference. After we are
|
/* Advance P to the end of this reference. After we are
|
||||||
finished expanding this one, P will be incremented to
|
finished expanding this one, P will be incremented to
|
||||||
continue the scan. */
|
continue the scan. */
|
||||||
p = end;
|
p = end;
|
||||||
|
|
||||||
/* This is not a reference to a built-in function and
|
/* This is not a reference to a built-in function and
|
||||||
any variable references inside are now expanded.
|
any variable references inside are now expanded.
|
||||||
Is the resultant text a substitution reference? */
|
Is the resultant text a substitution reference? */
|
||||||
|
|
||||||
colon = lindex (beg, end, ':');
|
colon = lindex (beg, end, ':');
|
||||||
if (colon)
|
if (colon)
|
||||||
{
|
{
|
||||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||||
const char *subst_beg, *subst_end, *replace_beg, *replace_end;
|
const char *subst_beg = colon + 1;
|
||||||
|
const char *subst_end = lindex (subst_beg, end, '=');
|
||||||
|
if (subst_end == 0)
|
||||||
|
/* There is no = in sight. Punt on the substitution
|
||||||
|
reference and treat this as a variable name containing
|
||||||
|
a colon, in the code below. */
|
||||||
|
colon = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char *replace_beg = subst_end + 1;
|
||||||
|
const char *replace_end = end;
|
||||||
|
|
||||||
subst_beg = colon + 1;
|
/* Extract the variable name before the colon
|
||||||
subst_end = lindex (subst_beg, end, '=');
|
and look up that variable. */
|
||||||
if (subst_end == 0)
|
v = lookup_variable (beg, colon - beg);
|
||||||
/* There is no = in sight. Punt on the substitution
|
if (v == 0)
|
||||||
reference and treat this as a variable name containing
|
warn_undefined (beg, colon - beg);
|
||||||
a colon, in the code below. */
|
|
||||||
colon = 0;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
replace_beg = subst_end + 1;
|
|
||||||
replace_end = end;
|
|
||||||
|
|
||||||
/* Extract the variable name before the colon
|
|
||||||
and look up that variable. */
|
|
||||||
v = lookup_variable (beg, colon - beg);
|
|
||||||
if (v == 0)
|
|
||||||
warn_undefined (beg, colon - beg);
|
|
||||||
|
|
||||||
/* If the variable is not empty, perform the
|
/* If the variable is not empty, perform the
|
||||||
substitution. */
|
substitution. */
|
||||||
if (v != 0 && *v->value != '\0')
|
if (v != 0 && *v->value != '\0')
|
||||||
{
|
{
|
||||||
char *pattern, *replace, *ppercent, *rpercent;
|
char *pattern, *replace, *ppercent, *rpercent;
|
||||||
char *value = (v->recursive
|
char *value = (v->recursive
|
||||||
? recursively_expand (v)
|
? recursively_expand (v)
|
||||||
: v->value);
|
: v->value);
|
||||||
|
|
||||||
/* Copy the pattern and the replacement. Add in an
|
/* Copy the pattern and the replacement. Add in an
|
||||||
extra % at the beginning to use in case there
|
extra % at the beginning to use in case there
|
||||||
@@ -356,15 +349,15 @@ variable_expand_string (char *line, const char *string, long length)
|
|||||||
|
|
||||||
/* Look for %. Set the percent pointers properly
|
/* Look for %. Set the percent pointers properly
|
||||||
based on whether we find one or not. */
|
based on whether we find one or not. */
|
||||||
ppercent = find_percent (pattern);
|
ppercent = find_percent (pattern);
|
||||||
if (ppercent)
|
if (ppercent)
|
||||||
{
|
{
|
||||||
++ppercent;
|
++ppercent;
|
||||||
rpercent = find_percent (replace);
|
rpercent = find_percent (replace);
|
||||||
if (rpercent)
|
if (rpercent)
|
||||||
++rpercent;
|
++rpercent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ppercent = pattern;
|
ppercent = pattern;
|
||||||
rpercent = replace;
|
rpercent = replace;
|
||||||
@@ -375,64 +368,59 @@ variable_expand_string (char *line, const char *string, long length)
|
|||||||
o = patsubst_expand_pat (o, value, pattern, replace,
|
o = patsubst_expand_pat (o, value, pattern, replace,
|
||||||
ppercent, rpercent);
|
ppercent, rpercent);
|
||||||
|
|
||||||
if (v->recursive)
|
if (v->recursive)
|
||||||
free (value);
|
free (value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colon == 0)
|
if (colon == 0)
|
||||||
/* This is an ordinary variable reference.
|
/* This is an ordinary variable reference.
|
||||||
Look up the value of the variable. */
|
Look up the value of the variable. */
|
||||||
o = reference_variable (o, beg, end - beg);
|
o = reference_variable (o, beg, end - beg);
|
||||||
|
|
||||||
if (abeg)
|
free (abeg);
|
||||||
free (abeg);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
case '\0':
|
default:
|
||||||
break;
|
if (ISSPACE (p[-1]))
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
/* A $ followed by a random char is a variable reference:
|
||||||
if (isblank ((unsigned char)p[-1]))
|
$a is equivalent to $(a). */
|
||||||
break;
|
|
||||||
|
|
||||||
/* A $ followed by a random char is a variable reference:
|
|
||||||
$a is equivalent to $(a). */
|
|
||||||
o = reference_variable (o, p, 1);
|
o = reference_variable (o, p, 1);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abuf)
|
free (save);
|
||||||
free (abuf);
|
|
||||||
|
|
||||||
variable_buffer_output (o, "", 1);
|
variable_buffer_output (o, "", 1);
|
||||||
return (variable_buffer + line_offset);
|
return (variable_buffer + line_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan LINE for variable references and expansion-function calls.
|
/* Scan LINE for variable references and expansion-function calls.
|
||||||
Build in `variable_buffer' the result of expanding the references and calls.
|
Build in 'variable_buffer' the result of expanding the references and calls.
|
||||||
Return the address of the resulting string, which is null-terminated
|
Return the address of the resulting string, which is null-terminated
|
||||||
and is valid only until the next time this function is called. */
|
and is valid only until the next time this function is called. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
variable_expand (const char *line)
|
variable_expand (const char *line)
|
||||||
{
|
{
|
||||||
return variable_expand_string(NULL, line, (long)-1);
|
return variable_expand_string (NULL, line, (long)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand an argument for an expansion function.
|
/* Expand an argument for an expansion function.
|
||||||
The text starting at STR and ending at END is variable-expanded
|
The text starting at STR and ending at END is variable-expanded
|
||||||
into a null-terminated string that is returned as the value.
|
into a null-terminated string that is returned as the value.
|
||||||
This is done without clobbering `variable_buffer' or the current
|
This is done without clobbering 'variable_buffer' or the current
|
||||||
variable-expansion that is in progress. */
|
variable-expansion that is in progress. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@@ -442,7 +430,7 @@ expand_argument (const char *str, const char *end)
|
|||||||
char *r;
|
char *r;
|
||||||
|
|
||||||
if (str == end)
|
if (str == end)
|
||||||
return xstrdup("");
|
return xstrdup ("");
|
||||||
|
|
||||||
if (!end || *end == '\0')
|
if (!end || *end == '\0')
|
||||||
return allocated_variable_expand (str);
|
return allocated_variable_expand (str);
|
||||||
@@ -457,8 +445,7 @@ expand_argument (const char *str, const char *end)
|
|||||||
|
|
||||||
r = allocated_variable_expand (tmp);
|
r = allocated_variable_expand (tmp);
|
||||||
|
|
||||||
if (alloc)
|
free (alloc);
|
||||||
free (alloc);
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -471,7 +458,7 @@ variable_expand_for_file (const char *line, struct file *file)
|
|||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
struct variable_set_list *savev;
|
struct variable_set_list *savev;
|
||||||
const struct floc *savef;
|
const gmk_floc *savef;
|
||||||
|
|
||||||
if (file == 0)
|
if (file == 0)
|
||||||
return variable_expand (line);
|
return variable_expand (line);
|
||||||
@@ -499,10 +486,12 @@ variable_expand_for_file (const char *line, struct file *file)
|
|||||||
|
|
||||||
static char *
|
static char *
|
||||||
variable_append (const char *name, unsigned int length,
|
variable_append (const char *name, unsigned int length,
|
||||||
const struct variable_set_list *set)
|
const struct variable_set_list *set, int local)
|
||||||
{
|
{
|
||||||
const struct variable *v;
|
const struct variable *v;
|
||||||
char *buf = 0;
|
char *buf = 0;
|
||||||
|
/* If this set is local and the next is not a parent, then next is local. */
|
||||||
|
int nextlocal = local && set->next_is_parent == 0;
|
||||||
|
|
||||||
/* If there's nothing left to check, return the empty buffer. */
|
/* If there's nothing left to check, return the empty buffer. */
|
||||||
if (!set)
|
if (!set)
|
||||||
@@ -511,14 +500,14 @@ variable_append (const char *name, unsigned int length,
|
|||||||
/* Try to find the variable in this variable set. */
|
/* Try to find the variable in this variable set. */
|
||||||
v = lookup_variable_in_set (name, length, set->set);
|
v = lookup_variable_in_set (name, length, set->set);
|
||||||
|
|
||||||
/* If there isn't one, look to see if there's one in a set above us. */
|
/* If there isn't one, or this one is private, try the set above us. */
|
||||||
if (!v)
|
if (!v || (!local && v->private_var))
|
||||||
return variable_append (name, length, set->next);
|
return variable_append (name, length, set->next, nextlocal);
|
||||||
|
|
||||||
/* If this variable type is append, first get any upper values.
|
/* If this variable type is append, first get any upper values.
|
||||||
If not, initialize the buffer. */
|
If not, initialize the buffer. */
|
||||||
if (v->append)
|
if (v->append)
|
||||||
buf = variable_append (name, length, set->next);
|
buf = variable_append (name, length, set->next, nextlocal);
|
||||||
else
|
else
|
||||||
buf = initialize_variable_output ();
|
buf = initialize_variable_output ();
|
||||||
|
|
||||||
@@ -548,7 +537,8 @@ allocated_variable_append (const struct variable *v)
|
|||||||
|
|
||||||
variable_buffer = 0;
|
variable_buffer = 0;
|
||||||
|
|
||||||
val = variable_append (v->name, strlen (v->name), current_variable_set_list);
|
val = variable_append (v->name, strlen (v->name),
|
||||||
|
current_variable_set_list, 1);
|
||||||
variable_buffer_output (val, "", 1);
|
variable_buffer_output (val, "", 1);
|
||||||
val = variable_buffer;
|
val = variable_buffer;
|
||||||
|
|
||||||
|
|||||||
327
file.c
327
file.c
@@ -1,7 +1,5 @@
|
|||||||
/* Target file management for GNU Make.
|
/* Target file management for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,12 +14,12 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "dep.h"
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
|
#include "dep.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
@@ -56,11 +54,11 @@ static int
|
|||||||
file_hash_cmp (const void *x, const void *y)
|
file_hash_cmp (const void *x, const void *y)
|
||||||
{
|
{
|
||||||
return_ISTRING_COMPARE (((struct file const *) x)->hname,
|
return_ISTRING_COMPARE (((struct file const *) x)->hname,
|
||||||
((struct file const *) y)->hname);
|
((struct file const *) y)->hname);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef FILE_BUCKETS
|
#ifndef FILE_BUCKETS
|
||||||
#define FILE_BUCKETS 1007
|
#define FILE_BUCKETS 1007
|
||||||
#endif
|
#endif
|
||||||
static struct hash_table files;
|
static struct hash_table files;
|
||||||
|
|
||||||
@@ -77,8 +75,11 @@ lookup_file (const char *name)
|
|||||||
{
|
{
|
||||||
struct file *f;
|
struct file *f;
|
||||||
struct file file_key;
|
struct file file_key;
|
||||||
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
#ifdef VMS
|
||||||
|
int want_vmsify;
|
||||||
|
#ifndef WANT_CASE_SENSITIVE_TARGETS
|
||||||
char *lname;
|
char *lname;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert (*name != '\0');
|
assert (*name != '\0');
|
||||||
@@ -87,6 +88,7 @@ lookup_file (const char *name)
|
|||||||
for names read from makefiles. It is here for names passed
|
for names read from makefiles. It is here for names passed
|
||||||
on the command line. */
|
on the command line. */
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
want_vmsify = (strpbrk (name, "]>:^") != NULL);
|
||||||
# ifndef WANT_CASE_SENSITIVE_TARGETS
|
# ifndef WANT_CASE_SENSITIVE_TARGETS
|
||||||
if (*name != '.')
|
if (*name != '.')
|
||||||
{
|
{
|
||||||
@@ -102,35 +104,41 @@ lookup_file (const char *name)
|
|||||||
|
|
||||||
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
||||||
name += 2;
|
name += 2;
|
||||||
|
while (name[0] == '<' && name[1] == '>' && name[2] != '\0')
|
||||||
|
name += 2;
|
||||||
#endif
|
#endif
|
||||||
while (name[0] == '.'
|
while (name[0] == '.'
|
||||||
#ifdef HAVE_DOS_PATHS
|
#ifdef HAVE_DOS_PATHS
|
||||||
&& (name[1] == '/' || name[1] == '\\')
|
&& (name[1] == '/' || name[1] == '\\')
|
||||||
#else
|
#else
|
||||||
&& name[1] == '/'
|
&& name[1] == '/'
|
||||||
#endif
|
#endif
|
||||||
&& name[2] != '\0')
|
&& name[2] != '\0')
|
||||||
{
|
{
|
||||||
name += 2;
|
name += 2;
|
||||||
while (*name == '/'
|
while (*name == '/'
|
||||||
#ifdef HAVE_DOS_PATHS
|
#ifdef HAVE_DOS_PATHS
|
||||||
|| *name == '\\'
|
|| *name == '\\'
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
|
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
|
||||||
++name;
|
++name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*name == '\0')
|
if (*name == '\0')
|
||||||
/* It was all slashes after a dot. */
|
{
|
||||||
#if defined(VMS)
|
/* It was all slashes after a dot. */
|
||||||
name = "[]";
|
#if defined(_AMIGA)
|
||||||
#elif defined(_AMIGA)
|
name = "";
|
||||||
name = "";
|
|
||||||
#else
|
#else
|
||||||
name = "./";
|
name = "./";
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(VMS)
|
||||||
|
/* TODO - This section is probably not needed. */
|
||||||
|
if (want_vmsify)
|
||||||
|
name = "[]";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
file_key.hname = name;
|
file_key.hname = name;
|
||||||
f = hash_find_item (&files, &file_key);
|
f = hash_find_item (&files, &file_key);
|
||||||
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
||||||
@@ -155,7 +163,7 @@ enter_file (const char *name)
|
|||||||
struct file file_key;
|
struct file file_key;
|
||||||
|
|
||||||
assert (*name != '\0');
|
assert (*name != '\0');
|
||||||
assert (strcache_iscached (name));
|
assert (! verify_flag || strcache_iscached (name));
|
||||||
|
|
||||||
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
|
||||||
if (*name != '.')
|
if (*name != '.')
|
||||||
@@ -179,11 +187,14 @@ enter_file (const char *name)
|
|||||||
file_slot = (struct file **) hash_find_slot (&files, &file_key);
|
file_slot = (struct file **) hash_find_slot (&files, &file_key);
|
||||||
f = *file_slot;
|
f = *file_slot;
|
||||||
if (! HASH_VACANT (f) && !f->double_colon)
|
if (! HASH_VACANT (f) && !f->double_colon)
|
||||||
return f;
|
{
|
||||||
|
f->builtin = 0;
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
new = xcalloc (sizeof (struct file));
|
new = xcalloc (sizeof (struct file));
|
||||||
new->name = new->hname = name;
|
new->name = new->hname = name;
|
||||||
new->update_status = -1;
|
new->update_status = us_none;
|
||||||
|
|
||||||
if (HASH_VACANT (f))
|
if (HASH_VACANT (f))
|
||||||
{
|
{
|
||||||
@@ -202,7 +213,7 @@ enter_file (const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Rehash FILE to NAME. This is not as simple as resetting
|
/* Rehash FILE to NAME. This is not as simple as resetting
|
||||||
the `hname' member, since it must be put in a new hash bucket,
|
the 'hname' member, since it must be put in a new hash bucket,
|
||||||
and possibly merged with an existing file called NAME. */
|
and possibly merged with an existing file called NAME. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -215,6 +226,7 @@ rehash_file (struct file *from_file, const char *to_hname)
|
|||||||
struct file *f;
|
struct file *f;
|
||||||
|
|
||||||
/* If it's already that name, we're done. */
|
/* If it's already that name, we're done. */
|
||||||
|
from_file->builtin = 0;
|
||||||
file_key.hname = to_hname;
|
file_key.hname = to_hname;
|
||||||
if (! file_hash_cmp (from_file, &file_key))
|
if (! file_hash_cmp (from_file, &file_key))
|
||||||
return;
|
return;
|
||||||
@@ -259,23 +271,26 @@ rehash_file (struct file *from_file, const char *to_hname)
|
|||||||
to_file->cmds = from_file->cmds;
|
to_file->cmds = from_file->cmds;
|
||||||
else if (from_file->cmds != to_file->cmds)
|
else if (from_file->cmds != to_file->cmds)
|
||||||
{
|
{
|
||||||
|
size_t l = strlen (from_file->name);
|
||||||
/* We have two sets of commands. We will go with the
|
/* We have two sets of commands. We will go with the
|
||||||
one given in the rule explicitly mentioning this name,
|
one given in the rule explicitly mentioning this name,
|
||||||
but give a message to let the user know what's going on. */
|
but give a message to let the user know what's going on. */
|
||||||
if (to_file->cmds->fileinfo.filenm != 0)
|
if (to_file->cmds->fileinfo.filenm != 0)
|
||||||
error (&from_file->cmds->fileinfo,
|
error (&from_file->cmds->fileinfo,
|
||||||
_("Recipe was specified for file `%s' at %s:%lu,"),
|
l + strlen (to_file->cmds->fileinfo.filenm) + INTSTR_LENGTH,
|
||||||
|
_("Recipe was specified for file '%s' at %s:%lu,"),
|
||||||
from_file->name, to_file->cmds->fileinfo.filenm,
|
from_file->name, to_file->cmds->fileinfo.filenm,
|
||||||
to_file->cmds->fileinfo.lineno);
|
to_file->cmds->fileinfo.lineno);
|
||||||
else
|
else
|
||||||
error (&from_file->cmds->fileinfo,
|
error (&from_file->cmds->fileinfo, l,
|
||||||
_("Recipe for file `%s' was found by implicit rule search,"),
|
_("Recipe for file '%s' was found by implicit rule search,"),
|
||||||
from_file->name);
|
from_file->name);
|
||||||
error (&from_file->cmds->fileinfo,
|
l += strlen (to_hname);
|
||||||
_("but `%s' is now considered the same file as `%s'."),
|
error (&from_file->cmds->fileinfo, l,
|
||||||
|
_("but '%s' is now considered the same file as '%s'."),
|
||||||
from_file->name, to_hname);
|
from_file->name, to_hname);
|
||||||
error (&from_file->cmds->fileinfo,
|
error (&from_file->cmds->fileinfo, l,
|
||||||
_("Recipe for `%s' will be ignored in favor of the one for `%s'."),
|
_("Recipe for '%s' will be ignored in favor of the one for '%s'."),
|
||||||
to_hname, from_file->name);
|
to_hname, from_file->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,13 +310,14 @@ rehash_file (struct file *from_file, const char *to_hname)
|
|||||||
merge_variable_set_lists (&to_file->variables, from_file->variables);
|
merge_variable_set_lists (&to_file->variables, from_file->variables);
|
||||||
|
|
||||||
if (to_file->double_colon && from_file->is_target && !from_file->double_colon)
|
if (to_file->double_colon && from_file->is_target && !from_file->double_colon)
|
||||||
fatal (NILF, _("can't rename single-colon `%s' to double-colon `%s'"),
|
OSS (fatal, NILF, _("can't rename single-colon '%s' to double-colon '%s'"),
|
||||||
from_file->name, to_hname);
|
from_file->name, to_hname);
|
||||||
if (!to_file->double_colon && from_file->double_colon)
|
if (!to_file->double_colon && from_file->double_colon)
|
||||||
{
|
{
|
||||||
if (to_file->is_target)
|
if (to_file->is_target)
|
||||||
fatal (NILF, _("can't rename double-colon `%s' to single-colon `%s'"),
|
OSS (fatal, NILF,
|
||||||
from_file->name, to_hname);
|
_("can't rename double-colon '%s' to single-colon '%s'"),
|
||||||
|
from_file->name, to_hname);
|
||||||
else
|
else
|
||||||
to_file->double_colon = from_file->double_colon;
|
to_file->double_colon = from_file->double_colon;
|
||||||
}
|
}
|
||||||
@@ -320,14 +336,16 @@ rehash_file (struct file *from_file, const char *to_hname)
|
|||||||
MERGE (is_target);
|
MERGE (is_target);
|
||||||
MERGE (cmd_target);
|
MERGE (cmd_target);
|
||||||
MERGE (phony);
|
MERGE (phony);
|
||||||
|
MERGE (loaded);
|
||||||
MERGE (ignore_vpath);
|
MERGE (ignore_vpath);
|
||||||
#undef MERGE
|
#undef MERGE
|
||||||
|
|
||||||
|
to_file->builtin = 0;
|
||||||
from_file->renamed = to_file;
|
from_file->renamed = to_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rename FILE to NAME. This is not as simple as resetting
|
/* Rename FILE to NAME. This is not as simple as resetting
|
||||||
the `name' member, since it must be put in a new hash bucket,
|
the 'name' member, since it must be put in a new hash bucket,
|
||||||
and possibly merged with an existing file called NAME. */
|
and possibly merged with an existing file called NAME. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -365,52 +383,53 @@ remove_intermediates (int sig)
|
|||||||
for ( ; file_slot < file_end; file_slot++)
|
for ( ; file_slot < file_end; file_slot++)
|
||||||
if (! HASH_VACANT (*file_slot))
|
if (! HASH_VACANT (*file_slot))
|
||||||
{
|
{
|
||||||
struct file *f = *file_slot;
|
struct file *f = *file_slot;
|
||||||
/* Is this file eligible for automatic deletion?
|
/* Is this file eligible for automatic deletion?
|
||||||
Yes, IFF: it's marked intermediate, it's not secondary, it wasn't
|
Yes, IFF: it's marked intermediate, it's not secondary, it wasn't
|
||||||
given on the command line, and it's either a -include makefile or
|
given on the command line, and it's either a -include makefile or
|
||||||
it's not precious. */
|
it's not precious. */
|
||||||
if (f->intermediate && (f->dontcare || !f->precious)
|
if (f->intermediate && (f->dontcare || !f->precious)
|
||||||
&& !f->secondary && !f->cmd_target)
|
&& !f->secondary && !f->cmd_target)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
if (f->update_status == -1)
|
if (f->update_status == us_none)
|
||||||
/* If nothing would have created this file yet,
|
/* If nothing would have created this file yet,
|
||||||
don't print an "rm" command for it. */
|
don't print an "rm" command for it. */
|
||||||
continue;
|
continue;
|
||||||
if (just_print_flag)
|
if (just_print_flag)
|
||||||
status = 0;
|
status = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
status = unlink (f->name);
|
status = unlink (f->name);
|
||||||
if (status < 0 && errno == ENOENT)
|
if (status < 0 && errno == ENOENT)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!f->dontcare)
|
if (!f->dontcare)
|
||||||
{
|
{
|
||||||
if (sig)
|
if (sig)
|
||||||
error (NILF, _("*** Deleting intermediate file `%s'"), f->name);
|
OS (error, NILF,
|
||||||
else
|
_("*** Deleting intermediate file '%s'"), f->name);
|
||||||
{
|
else
|
||||||
if (! doneany)
|
{
|
||||||
DB (DB_BASIC, (_("Removing intermediate files...\n")));
|
if (! doneany)
|
||||||
if (!silent_flag)
|
DB (DB_BASIC, (_("Removing intermediate files...\n")));
|
||||||
{
|
if (!silent_flag)
|
||||||
if (! doneany)
|
{
|
||||||
{
|
if (! doneany)
|
||||||
fputs ("rm ", stdout);
|
{
|
||||||
doneany = 1;
|
fputs ("rm ", stdout);
|
||||||
}
|
doneany = 1;
|
||||||
else
|
}
|
||||||
putchar (' ');
|
else
|
||||||
fputs (f->name, stdout);
|
putchar (' ');
|
||||||
fflush (stdout);
|
fputs (f->name, stdout);
|
||||||
}
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
if (status < 0)
|
}
|
||||||
perror_with_name ("unlink: ", f->name);
|
if (status < 0)
|
||||||
}
|
perror_with_name ("unlink: ", f->name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doneany && !sig)
|
if (doneany && !sig)
|
||||||
@@ -426,7 +445,8 @@ remove_intermediates (int sig)
|
|||||||
struct dep *
|
struct dep *
|
||||||
split_prereqs (char *p)
|
split_prereqs (char *p)
|
||||||
{
|
{
|
||||||
struct dep *new = PARSE_FILE_SEQ (&p, struct dep, '|', NULL, 0);
|
struct dep *new = PARSE_FILE_SEQ (&p, struct dep, MAP_PIPE, NULL,
|
||||||
|
PARSEFS_NONE);
|
||||||
|
|
||||||
if (*p)
|
if (*p)
|
||||||
{
|
{
|
||||||
@@ -435,7 +455,7 @@ split_prereqs (char *p)
|
|||||||
struct dep *ood;
|
struct dep *ood;
|
||||||
|
|
||||||
++p;
|
++p;
|
||||||
ood = PARSE_FILE_SEQ (&p, struct dep, '\0', NULL, 0);
|
ood = PARSE_SIMPLE_SEQ (&p, struct dep);
|
||||||
|
|
||||||
if (! new)
|
if (! new)
|
||||||
new = ood;
|
new = ood;
|
||||||
@@ -575,12 +595,11 @@ expand_deps (struct file *f)
|
|||||||
"$*" so they'll expand properly. */
|
"$*" so they'll expand properly. */
|
||||||
if (d->staticpattern)
|
if (d->staticpattern)
|
||||||
{
|
{
|
||||||
char *o;
|
char *o = variable_expand ("");
|
||||||
d->name = o = variable_expand ("");
|
|
||||||
o = subst_expand (o, name, "%", "$*", 1, 2, 0);
|
o = subst_expand (o, name, "%", "$*", 1, 2, 0);
|
||||||
*o = '\0';
|
*o = '\0';
|
||||||
free (name);
|
free (name);
|
||||||
d->name = name = xstrdup (d->name);
|
d->name = name = xstrdup (variable_buffer);
|
||||||
d->staticpattern = 0;
|
d->staticpattern = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,8 +656,8 @@ reset_updating (const void *item)
|
|||||||
f->updating = 0;
|
f->updating = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For each dependency of each file, make the `struct dep' point
|
/* For each dependency of each file, make the 'struct dep' point
|
||||||
at the appropriate `struct file' (which may have to be created).
|
at the appropriate 'struct file' (which may have to be created).
|
||||||
|
|
||||||
Also mark the files depended on by .PRECIOUS, .PHONY, .SILENT,
|
Also mark the files depended on by .PRECIOUS, .PHONY, .SILENT,
|
||||||
and various other special targets. */
|
and various other special targets. */
|
||||||
@@ -693,23 +712,23 @@ snap_deps (void)
|
|||||||
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
|
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
f2->precious = 1;
|
f2->precious = 1;
|
||||||
|
|
||||||
for (f = lookup_file (".LOW_RESOLUTION_TIME"); f != 0; f = f->prev)
|
for (f = lookup_file (".LOW_RESOLUTION_TIME"); f != 0; f = f->prev)
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
f2->low_resolution_time = 1;
|
f2->low_resolution_time = 1;
|
||||||
|
|
||||||
for (f = lookup_file (".PHONY"); f != 0; f = f->prev)
|
for (f = lookup_file (".PHONY"); f != 0; f = f->prev)
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
{
|
{
|
||||||
/* Mark this file as phony nonexistent target. */
|
/* Mark this file as phony nonexistent target. */
|
||||||
f2->phony = 1;
|
f2->phony = 1;
|
||||||
f2->is_target = 1;
|
f2->is_target = 1;
|
||||||
f2->last_mtime = NONEXISTENT_MTIME;
|
f2->last_mtime = NONEXISTENT_MTIME;
|
||||||
f2->mtime_before_update = NONEXISTENT_MTIME;
|
f2->mtime_before_update = NONEXISTENT_MTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (f = lookup_file (".INTERMEDIATE"); f != 0; f = f->prev)
|
for (f = lookup_file (".INTERMEDIATE"); f != 0; f = f->prev)
|
||||||
/* Mark .INTERMEDIATE deps as intermediate files. */
|
/* Mark .INTERMEDIATE deps as intermediate files. */
|
||||||
@@ -741,22 +760,22 @@ snap_deps (void)
|
|||||||
if (f != 0 && f->is_target)
|
if (f != 0 && f->is_target)
|
||||||
{
|
{
|
||||||
if (f->deps == 0)
|
if (f->deps == 0)
|
||||||
ignore_errors_flag = 1;
|
ignore_errors_flag = 1;
|
||||||
else
|
else
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
f2->command_flags |= COMMANDS_NOERROR;
|
f2->command_flags |= COMMANDS_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = lookup_file (".SILENT");
|
f = lookup_file (".SILENT");
|
||||||
if (f != 0 && f->is_target)
|
if (f != 0 && f->is_target)
|
||||||
{
|
{
|
||||||
if (f->deps == 0)
|
if (f->deps == 0)
|
||||||
silent_flag = 1;
|
silent_flag = 1;
|
||||||
else
|
else
|
||||||
for (d = f->deps; d != 0; d = d->next)
|
for (d = f->deps; d != 0; d = d->next)
|
||||||
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
for (f2 = d->file; f2 != 0; f2 = f2->prev)
|
||||||
f2->command_flags |= COMMANDS_SILENT;
|
f2->command_flags |= COMMANDS_SILENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = lookup_file (".NOTPARALLEL");
|
f = lookup_file (".NOTPARALLEL");
|
||||||
@@ -772,7 +791,7 @@ snap_deps (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the `command_state' member of FILE and all its `also_make's. */
|
/* Set the 'command_state' member of FILE and all its 'also_make's. */
|
||||||
|
|
||||||
void
|
void
|
||||||
set_command_state (struct file *file, enum cmd_state state)
|
set_command_state (struct file *file, enum cmd_state state)
|
||||||
@@ -788,20 +807,22 @@ set_command_state (struct file *file, enum cmd_state state)
|
|||||||
/* Convert an external file timestamp to internal form. */
|
/* Convert an external file timestamp to internal form. */
|
||||||
|
|
||||||
FILE_TIMESTAMP
|
FILE_TIMESTAMP
|
||||||
file_timestamp_cons (const char *fname, time_t s, int ns)
|
file_timestamp_cons (const char *fname, time_t stamp, long int ns)
|
||||||
{
|
{
|
||||||
int offset = ORDINARY_MTIME_MIN + (FILE_TIMESTAMP_HI_RES ? ns : 0);
|
int offset = ORDINARY_MTIME_MIN + (FILE_TIMESTAMP_HI_RES ? ns : 0);
|
||||||
|
FILE_TIMESTAMP s = stamp;
|
||||||
FILE_TIMESTAMP product = (FILE_TIMESTAMP) s << FILE_TIMESTAMP_LO_BITS;
|
FILE_TIMESTAMP product = (FILE_TIMESTAMP) s << FILE_TIMESTAMP_LO_BITS;
|
||||||
FILE_TIMESTAMP ts = product + offset;
|
FILE_TIMESTAMP ts = product + offset;
|
||||||
|
|
||||||
if (! (s <= FILE_TIMESTAMP_S (ORDINARY_MTIME_MAX)
|
if (! (s <= FILE_TIMESTAMP_S (ORDINARY_MTIME_MAX)
|
||||||
&& product <= ts && ts <= ORDINARY_MTIME_MAX))
|
&& product <= ts && ts <= ORDINARY_MTIME_MAX))
|
||||||
{
|
{
|
||||||
char buf[FILE_TIMESTAMP_PRINT_LEN_BOUND + 1];
|
char buf[FILE_TIMESTAMP_PRINT_LEN_BOUND + 1];
|
||||||
|
const char *f = fname ? fname : _("Current time");
|
||||||
ts = s <= OLD_MTIME ? ORDINARY_MTIME_MIN : ORDINARY_MTIME_MAX;
|
ts = s <= OLD_MTIME ? ORDINARY_MTIME_MIN : ORDINARY_MTIME_MAX;
|
||||||
file_timestamp_sprintf (buf, ts);
|
file_timestamp_sprintf (buf, ts);
|
||||||
error (NILF, _("%s: Timestamp out of range; substituting %s"),
|
OSS (error, NILF,
|
||||||
fname ? fname : _("Current time"), buf);
|
_("%s: Timestamp out of range; substituting %s"), f, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ts;
|
return ts;
|
||||||
@@ -825,10 +846,10 @@ file_timestamp_now (int *resolution)
|
|||||||
struct timespec timespec;
|
struct timespec timespec;
|
||||||
if (clock_gettime (CLOCK_REALTIME, ×pec) == 0)
|
if (clock_gettime (CLOCK_REALTIME, ×pec) == 0)
|
||||||
{
|
{
|
||||||
r = 1;
|
r = 1;
|
||||||
s = timespec.tv_sec;
|
s = timespec.tv_sec;
|
||||||
ns = timespec.tv_nsec;
|
ns = timespec.tv_nsec;
|
||||||
goto got_time;
|
goto got_time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@@ -837,10 +858,10 @@ file_timestamp_now (int *resolution)
|
|||||||
struct timeval timeval;
|
struct timeval timeval;
|
||||||
if (gettimeofday (&timeval, 0) == 0)
|
if (gettimeofday (&timeval, 0) == 0)
|
||||||
{
|
{
|
||||||
r = 1000;
|
r = 1000;
|
||||||
s = timeval.tv_sec;
|
s = timeval.tv_sec;
|
||||||
ns = timeval.tv_usec * 1000;
|
ns = timeval.tv_usec * 1000;
|
||||||
goto got_time;
|
goto got_time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@@ -867,8 +888,8 @@ file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts)
|
|||||||
|
|
||||||
if (tm)
|
if (tm)
|
||||||
sprintf (p, "%04d-%02d-%02d %02d:%02d:%02d",
|
sprintf (p, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||||
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
|
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
|
||||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
else if (t < 0)
|
else if (t < 0)
|
||||||
sprintf (p, "%ld", (long) t);
|
sprintf (p, "%ld", (long) t);
|
||||||
else
|
else
|
||||||
@@ -919,7 +940,27 @@ print_file (const void *item)
|
|||||||
{
|
{
|
||||||
const struct file *f = item;
|
const struct file *f = item;
|
||||||
|
|
||||||
|
/* If we're not using builtin targets, don't show them.
|
||||||
|
|
||||||
|
Ideally we'd be able to delete them altogether but currently there's no
|
||||||
|
facility to ever delete a file once it's been added. */
|
||||||
|
if (no_builtin_rules_flag && f->builtin)
|
||||||
|
return;
|
||||||
|
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
|
|
||||||
|
if (f->cmds && f->cmds->recipe_prefix != cmd_prefix)
|
||||||
|
{
|
||||||
|
fputs (".RECIPEPREFIX = ", stdout);
|
||||||
|
cmd_prefix = f->cmds->recipe_prefix;
|
||||||
|
if (cmd_prefix != RECIPEPREFIX_DEFAULT)
|
||||||
|
putchar (cmd_prefix);
|
||||||
|
putchar ('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (f->variables != 0)
|
||||||
|
print_target_variables (f);
|
||||||
|
|
||||||
if (!f->is_target)
|
if (!f->is_target)
|
||||||
puts (_("# Not a target:"));
|
puts (_("# Not a target:"));
|
||||||
printf ("%s:%s", f->name, f->double_colon ? ":" : "");
|
printf ("%s:%s", f->name, f->double_colon ? ":" : "");
|
||||||
@@ -933,11 +974,13 @@ print_file (const void *item)
|
|||||||
puts (_("# Command line target."));
|
puts (_("# Command line target."));
|
||||||
if (f->dontcare)
|
if (f->dontcare)
|
||||||
puts (_("# A default, MAKEFILES, or -include/sinclude makefile."));
|
puts (_("# A default, MAKEFILES, or -include/sinclude makefile."));
|
||||||
|
if (f->builtin)
|
||||||
|
puts (_("# Builtin rule"));
|
||||||
puts (f->tried_implicit
|
puts (f->tried_implicit
|
||||||
? _("# Implicit rule search has been done.")
|
? _("# Implicit rule search has been done.")
|
||||||
: _("# Implicit rule search has not been done."));
|
: _("# Implicit rule search has not been done."));
|
||||||
if (f->stem != 0)
|
if (f->stem != 0)
|
||||||
printf (_("# Implicit/static pattern stem: `%s'\n"), f->stem);
|
printf (_("# Implicit/static pattern stem: '%s'\n"), f->stem);
|
||||||
if (f->intermediate)
|
if (f->intermediate)
|
||||||
puts (_("# File is an intermediate prerequisite."));
|
puts (_("# File is an intermediate prerequisite."));
|
||||||
if (f->also_make != 0)
|
if (f->also_make != 0)
|
||||||
@@ -945,7 +988,7 @@ print_file (const void *item)
|
|||||||
const struct dep *d;
|
const struct dep *d;
|
||||||
fputs (_("# Also makes:"), stdout);
|
fputs (_("# Also makes:"), stdout);
|
||||||
for (d = f->also_make; d != 0; d = d->next)
|
for (d = f->also_make; d != 0; d = d->next)
|
||||||
printf (" %s", dep_name (d));
|
printf (" %s", dep_name (d));
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
}
|
}
|
||||||
if (f->last_mtime == UNKNOWN_MTIME)
|
if (f->last_mtime == UNKNOWN_MTIME)
|
||||||
@@ -973,28 +1016,23 @@ print_file (const void *item)
|
|||||||
case cs_not_started:
|
case cs_not_started:
|
||||||
case cs_finished:
|
case cs_finished:
|
||||||
switch (f->update_status)
|
switch (f->update_status)
|
||||||
{
|
{
|
||||||
case -1:
|
case us_none:
|
||||||
break;
|
break;
|
||||||
case 0:
|
case us_success:
|
||||||
puts (_("# Successfully updated."));
|
puts (_("# Successfully updated."));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case us_question:
|
||||||
assert (question_flag);
|
assert (question_flag);
|
||||||
puts (_("# Needs to be updated (-q is set)."));
|
puts (_("# Needs to be updated (-q is set)."));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case us_failed:
|
||||||
puts (_("# Failed to be updated."));
|
puts (_("# Failed to be updated."));
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
puts (_("# Invalid value in `update_status' member!"));
|
|
||||||
fflush (stdout);
|
|
||||||
fflush (stderr);
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
puts (_("# Invalid value in `command_state' member!"));
|
puts (_("# Invalid value in 'command_state' member!"));
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
abort ();
|
abort ();
|
||||||
@@ -1024,9 +1062,10 @@ print_file_data_base (void)
|
|||||||
/* Verify the integrity of the data base of files. */
|
/* Verify the integrity of the data base of files. */
|
||||||
|
|
||||||
#define VERIFY_CACHED(_p,_n) \
|
#define VERIFY_CACHED(_p,_n) \
|
||||||
do{\
|
do{ \
|
||||||
if (_p->_n && _p->_n[0] && !strcache_iscached (_p->_n)) \
|
if (_p->_n && _p->_n[0] && !strcache_iscached (_p->_n)) \
|
||||||
error (NULL, "%s: Field '%s' not cached: %s\n", _p->name, # _n, _p->_n); \
|
error (NULL, strlen (_p->name) + CSTRLEN (# _n) + strlen (_p->_n), \
|
||||||
|
_("%s: Field '%s' not cached: %s"), _p->name, # _n, _p->_n); \
|
||||||
}while(0)
|
}while(0)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
100
filedef.h
100
filedef.h
@@ -1,7 +1,5 @@
|
|||||||
/* Definition of target file data structures for GNU Make.
|
/* Definition of target file data structures for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -19,7 +17,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* Structure that represents the info on one file
|
/* Structure that represents the info on one file
|
||||||
that the makefile says how to make.
|
that the makefile says how to make.
|
||||||
All of these are chained together through `next'. */
|
All of these are chained together through 'next'. */
|
||||||
|
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
@@ -28,22 +26,18 @@ struct file
|
|||||||
const char *name;
|
const char *name;
|
||||||
const char *hname; /* Hashed filename */
|
const char *hname; /* Hashed filename */
|
||||||
const char *vpath; /* VPATH/vpath pathname */
|
const char *vpath; /* VPATH/vpath pathname */
|
||||||
struct dep *deps; /* all dependencies, including duplicates */
|
struct dep *deps; /* all dependencies, including duplicates */
|
||||||
struct commands *cmds; /* Commands to execute for this target. */
|
struct commands *cmds; /* Commands to execute for this target. */
|
||||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
const char *stem; /* Implicit stem, if an implicit
|
||||||
const char *stem; /* Implicit stem, if an implicit
|
|
||||||
rule has been used */
|
rule has been used */
|
||||||
struct dep *also_make; /* Targets that are made by making this. */
|
struct dep *also_make; /* Targets that are made by making this. */
|
||||||
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
struct file *prev; /* Previous entry for same file name;
|
||||||
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
used when there are multiple double-colon
|
||||||
has been performed. */
|
entries for the same file. */
|
||||||
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. */
|
struct file *last; /* Last entry for the same file name. */
|
||||||
|
|
||||||
/* File that this file was renamed to. After any time that a
|
/* File that this file was renamed to. After any time that a
|
||||||
file could be renamed, call `check_renamed' (below). */
|
file could be renamed, call 'check_renamed' (below). */
|
||||||
struct file *renamed;
|
struct file *renamed;
|
||||||
|
|
||||||
/* List of variable sets used for this file. */
|
/* List of variable sets used for this file. */
|
||||||
@@ -61,34 +55,44 @@ struct file
|
|||||||
the same file. Otherwise this is null. */
|
the same file. Otherwise this is null. */
|
||||||
struct file *double_colon;
|
struct file *double_colon;
|
||||||
|
|
||||||
short int update_status; /* Status of the last attempt to update,
|
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||||
or -1 if none has been made. */
|
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||||
|
has been performed. */
|
||||||
enum cmd_state /* State of the commands. */
|
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||||
{ /* Note: It is important that cs_not_started be zero. */
|
enum update_status /* Status of the last attempt to update. */
|
||||||
cs_not_started, /* Not yet started. */
|
{
|
||||||
cs_deps_running, /* Dep commands running. */
|
us_success = 0, /* Successfully updated. Must be 0! */
|
||||||
cs_running, /* Commands running. */
|
us_none, /* No attempt to update has been made. */
|
||||||
cs_finished /* Commands finished. */
|
us_question, /* Needs to be updated (-q is is set). */
|
||||||
|
us_failed /* Update failed. */
|
||||||
|
} update_status ENUM_BITFIELD (2);
|
||||||
|
enum cmd_state /* State of the commands. */
|
||||||
|
{
|
||||||
|
cs_not_started = 0, /* Not yet started. Must be 0! */
|
||||||
|
cs_deps_running, /* Dep commands running. */
|
||||||
|
cs_running, /* Commands running. */
|
||||||
|
cs_finished /* Commands finished. */
|
||||||
} command_state ENUM_BITFIELD (2);
|
} command_state ENUM_BITFIELD (2);
|
||||||
|
|
||||||
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
unsigned int builtin:1; /* True if the file is a builtin rule. */
|
||||||
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
||||||
has only one-second resolution. */
|
unsigned int loaded:1; /* True if the file is a loaded object. */
|
||||||
|
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
||||||
|
has only one-second resolution. */
|
||||||
unsigned int tried_implicit:1; /* Nonzero if have searched
|
unsigned int tried_implicit:1; /* Nonzero if have searched
|
||||||
for implicit rule for making
|
for implicit rule for making
|
||||||
this file; don't search again. */
|
this file; don't search again. */
|
||||||
unsigned int updating:1; /* Nonzero while updating deps of this file */
|
unsigned int updating:1; /* Nonzero while updating deps of this file */
|
||||||
unsigned int updated:1; /* Nonzero if this file has been remade. */
|
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 is_target:1; /* Nonzero if file is described as target. */
|
||||||
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
||||||
unsigned int phony:1; /* Nonzero if this is a phony file
|
unsigned int phony:1; /* Nonzero if this is a phony file
|
||||||
i.e., a prerequisite of .PHONY. */
|
i.e., a prerequisite of .PHONY. */
|
||||||
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
||||||
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
||||||
not delete it. */
|
not delete it. */
|
||||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||||
this target cannot be remade. */
|
this target cannot be remade. */
|
||||||
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||||
pattern-specific variables. */
|
pattern-specific variables. */
|
||||||
@@ -119,7 +123,7 @@ void print_file_data_base (void);
|
|||||||
|
|
||||||
#if FILE_TIMESTAMP_HI_RES
|
#if FILE_TIMESTAMP_HI_RES
|
||||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||||
file_timestamp_cons (fname, (st).st_mtime, (st).st_mtim.ST_MTIM_NSEC)
|
file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
|
||||||
#else
|
#else
|
||||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||||
file_timestamp_cons (fname, (st).st_mtime, 0)
|
file_timestamp_cons (fname, (st).st_mtime, 0)
|
||||||
@@ -134,12 +138,12 @@ void print_file_data_base (void);
|
|||||||
#define FILE_TIMESTAMP_LO_BITS (FILE_TIMESTAMP_HI_RES ? 30 : 0)
|
#define FILE_TIMESTAMP_LO_BITS (FILE_TIMESTAMP_HI_RES ? 30 : 0)
|
||||||
|
|
||||||
#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
|
#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
|
||||||
>> FILE_TIMESTAMP_LO_BITS)
|
>> FILE_TIMESTAMP_LO_BITS)
|
||||||
#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
|
#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
|
||||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||||
|
|
||||||
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
||||||
representing a file timestamp. The upper bound is not necessarily 19,
|
representing a file timestamp. The upper bound is not necessarily 29,
|
||||||
since the year might be less than -999 or greater than 9999.
|
since the year might be less than -999 or greater than 9999.
|
||||||
|
|
||||||
Subtract one for the sign bit if in case file timestamps can be negative;
|
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||||
@@ -156,7 +160,7 @@ void print_file_data_base (void);
|
|||||||
* 302 / 1000) \
|
* 302 / 1000) \
|
||||||
+ 1 + 1 + 4 + 25)
|
+ 1 + 1 + 4 + 25)
|
||||||
|
|
||||||
FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, int);
|
FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int);
|
||||||
FILE_TIMESTAMP file_timestamp_now (int *);
|
FILE_TIMESTAMP file_timestamp_now (int *);
|
||||||
void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts);
|
void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts);
|
||||||
|
|
||||||
@@ -187,13 +191,13 @@ FILE_TIMESTAMP f_mtime (struct file *file, int search);
|
|||||||
/* The smallest and largest ordinary timestamps. */
|
/* The smallest and largest ordinary timestamps. */
|
||||||
#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
|
#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
|
||||||
#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
|
#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
|
||||||
<< FILE_TIMESTAMP_LO_BITS) \
|
<< FILE_TIMESTAMP_LO_BITS) \
|
||||||
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
||||||
|
|
||||||
/* Modtime value to use for `infinitely new'. We used to get the current time
|
/* Modtime value to use for 'infinitely new'. We used to get the current time
|
||||||
from the system and use that whenever we wanted `new'. But that causes
|
from the system and use that whenever we wanted 'new'. But that causes
|
||||||
trouble when the machine running make and the machine holding a file have
|
trouble when the machine running make and the machine holding a file have
|
||||||
different ideas about what time it is; and can also lose for `force'
|
different ideas about what time it is; and can also lose for 'force'
|
||||||
targets, which need to be considered newer than anything that depends on
|
targets, which need to be considered newer than anything that depends on
|
||||||
them, even if said dependents' modtimes are in the future. */
|
them, even if said dependents' modtimes are in the future. */
|
||||||
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
||||||
|
|||||||
1421
function.c
1421
function.c
File diff suppressed because it is too large
Load Diff
12
getloadavg.c
12
getloadavg.c
@@ -1,7 +1,5 @@
|
|||||||
/* Get the system load averages.
|
/* Get the system load averages.
|
||||||
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
|
Copyright (C) 1985-2016 Free Software Foundation, Inc.
|
||||||
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
|
||||||
2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@@ -86,9 +84,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
|
|
||||||
/* Exclude all the code except the test program at the end
|
/* Exclude all the code except the test program at the end
|
||||||
if the system has its own `getloadavg' function.
|
if the system has its own 'getloadavg' function.
|
||||||
|
|
||||||
The declaration of `errno' is needed by the test program
|
The declaration of 'errno' is needed by the test program
|
||||||
as well as the function itself, so it comes first. */
|
as well as the function itself, so it comes first. */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -745,7 +743,7 @@ getloadavg (double loadavg[], int nelem)
|
|||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
/* This call can return -1 for an error, but with good args
|
/* This call can return -1 for an error, but with good args
|
||||||
it's not supposed to fail. The first argument is for no
|
it's not supposed to fail. The first argument is for no
|
||||||
apparent reason of type `long int *'. */
|
apparent reason of type 'long int *'. */
|
||||||
dg_sys_info ((long int *) &load_info,
|
dg_sys_info ((long int *) &load_info,
|
||||||
DG_SYS_INFO_LOAD_INFO_TYPE,
|
DG_SYS_INFO_LOAD_INFO_TYPE,
|
||||||
DG_SYS_INFO_LOAD_VERSION_0);
|
DG_SYS_INFO_LOAD_VERSION_0);
|
||||||
@@ -987,7 +985,7 @@ getloadavg (double loadavg[], int nelem)
|
|||||||
#endif /* ! HAVE_GETLOADAVG */
|
#endif /* ! HAVE_GETLOADAVG */
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
|
|||||||
26
getopt.c
26
getopt.c
@@ -3,9 +3,7 @@ NOTE: getopt is now part of the C library, so if you don't know what
|
|||||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||||
before changing it!
|
before changing it!
|
||||||
|
|
||||||
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
||||||
1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
@@ -83,7 +81,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#define _(msgid) gettext (msgid)
|
#define _(msgid) gettext (msgid)
|
||||||
|
|
||||||
|
|
||||||
/* This version of `getopt' appears to the caller like standard Unix `getopt'
|
/* This version of `getopt' appears to the caller like standard Unix 'getopt'
|
||||||
but it behaves differently for the user, since it allows the user
|
but it behaves differently for the user, since it allows the user
|
||||||
to intersperse the options with the other arguments.
|
to intersperse the options with the other arguments.
|
||||||
|
|
||||||
@@ -658,7 +656,7 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
if (ambig && !exact)
|
if (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optind++;
|
optind++;
|
||||||
@@ -682,12 +680,12 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
if (argv[optind - 1][1] == '-')
|
if (argv[optind - 1][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
_("%s: option '--%s' doesn't allow an argument\n"),
|
||||||
argv[0], pfound->name);
|
argv[0], pfound->name);
|
||||||
else
|
else
|
||||||
/* +option or -option */
|
/* +option or -option */
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
_("%s: option '%c%s' doesn't allow an argument\n"),
|
||||||
argv[0], argv[optind - 1][0], pfound->name);
|
argv[0], argv[optind - 1][0], pfound->name);
|
||||||
|
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -704,7 +702,7 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option '%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optopt = pfound->val;
|
optopt = pfound->val;
|
||||||
@@ -733,11 +731,11 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
{
|
{
|
||||||
if (argv[optind][1] == '-')
|
if (argv[optind][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
|
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
|
||||||
argv[0], nextchar);
|
argv[0], nextchar);
|
||||||
else
|
else
|
||||||
/* +option or -option */
|
/* +option or -option */
|
||||||
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
|
fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
|
||||||
argv[0], argv[optind][0], nextchar);
|
argv[0], argv[optind][0], nextchar);
|
||||||
}
|
}
|
||||||
nextchar = (char *) "";
|
nextchar = (char *) "";
|
||||||
@@ -843,7 +841,7 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
if (ambig && !exact)
|
if (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optind++;
|
optind++;
|
||||||
@@ -862,7 +860,7 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("\
|
fprintf (stderr, _("\
|
||||||
%s: option `-W %s' doesn't allow an argument\n"),
|
%s: option '-W %s' doesn't allow an argument\n"),
|
||||||
argv[0], pfound->name);
|
argv[0], pfound->name);
|
||||||
|
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -877,7 +875,7 @@ _getopt_internal (int argc, char *const *argv, const char *optstring,
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option '%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
return optstring[0] == ':' ? ':' : '?';
|
return optstring[0] == ':' ? ':' : '?';
|
||||||
@@ -1003,7 +1001,7 @@ main (int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
printf ("option c with value `%s'\n", optarg);
|
printf ("option c with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
|||||||
4
getopt.h
4
getopt.h
@@ -1,7 +1,5 @@
|
|||||||
/* Declarations for getopt.
|
/* Declarations for getopt.
|
||||||
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright (C) 1989-2016 Free Software Foundation, Inc.
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
|
||||||
Software Foundation, Inc.
|
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||||
Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
|
Copyright (C) 1987-1994, 1996-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
@@ -149,11 +147,11 @@ main (int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
printf ("option c with value `%s'\n", optarg);
|
printf ("option c with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
printf ("option d with value `%s'\n", optarg);
|
printf ("option d with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
Makefile Makefile.in
|
|
||||||
.deps
|
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
2013-10-20 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (glob): Cherry-pick a471e96a5352a5f0bde6d32dd36d33524811a2b1
|
||||||
|
from git://sourceware.org/git/glibc.git to fix SV 18123,
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=10278
|
||||||
|
|
||||||
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
||||||
|
|
||||||
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
||||||
|
|||||||
@@ -377,6 +377,11 @@ glob (pattern, flags, errfunc, pglob)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* POSIX requires all slashes to be matched. This means that with
|
||||||
|
a trailing slash we must match only directories. */
|
||||||
|
if (pattern[0] && pattern[strlen (pattern) - 1] == '/')
|
||||||
|
flags |= GLOB_ONLYDIR;
|
||||||
|
|
||||||
if (flags & GLOB_BRACE)
|
if (flags & GLOB_BRACE)
|
||||||
{
|
{
|
||||||
const char *begin = strchr (pattern, '{');
|
const char *begin = strchr (pattern, '{');
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ typedef __SIZE_TYPE__ __size_t;
|
|||||||
# else
|
# else
|
||||||
/* This is a guess. */
|
/* This is a guess. */
|
||||||
/*hb
|
/*hb
|
||||||
* Conflicts with DECCs aready defined type __size_t.
|
* Conflicts with DECCs already defined type __size_t.
|
||||||
* Defining an own type with a name beginning with '__' is no good.
|
* Defining an own type with a name beginning with '__' is no good.
|
||||||
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
|
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
|
||||||
* already defined (and I hope it's exactly the one we need here).
|
* already defined (and I hope it's exactly the one we need here).
|
||||||
|
|||||||
53
gmk-default.scm
Normal file
53
gmk-default.scm
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
;; Contents of the (gnu make) Guile module
|
||||||
|
;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
|
||||||
|
;; This file is part of GNU Make.
|
||||||
|
;;
|
||||||
|
;; GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
;; the terms of the GNU General Public License as published by the Free
|
||||||
|
;; Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
;; any later version.
|
||||||
|
;;
|
||||||
|
;; GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
;; details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License along
|
||||||
|
;; with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define (to-string-maybe x)
|
||||||
|
(cond
|
||||||
|
;; In GNU make, "false" is the empty string
|
||||||
|
((or (not x)
|
||||||
|
(unspecified? x)
|
||||||
|
(variable? x)
|
||||||
|
(null? x)
|
||||||
|
(and (string? x) (string-null? x)))
|
||||||
|
#f)
|
||||||
|
;; We want something not false... not sure about this
|
||||||
|
((eq? x #t) "#t")
|
||||||
|
;; Basics
|
||||||
|
((or (symbol? x) (number? x))
|
||||||
|
(object->string x))
|
||||||
|
((char? x)
|
||||||
|
(string x))
|
||||||
|
;; Printable string (no special characters)
|
||||||
|
((and (string? x) (string-every char-set:printing x))
|
||||||
|
x)
|
||||||
|
;; No idea: fail
|
||||||
|
(else (error "Unknown object:" x))))
|
||||||
|
|
||||||
|
(define (obj-to-str x)
|
||||||
|
(let ((acc '()))
|
||||||
|
(define (walk x)
|
||||||
|
(cond ((pair? x) (walk (car x)) (walk (cdr x)))
|
||||||
|
((to-string-maybe x) => (lambda (s) (set! acc (cons s acc))))))
|
||||||
|
(walk x)
|
||||||
|
(string-join (reverse! acc))))
|
||||||
|
|
||||||
|
;; Return the value of the GNU make variable V
|
||||||
|
(define (gmk-var v)
|
||||||
|
(gmk-expand (format #f "$(~a)" (obj-to-str v))))
|
||||||
|
|
||||||
|
;; Export the public interfaces
|
||||||
|
(export gmk-expand gmk-eval gmk-var)
|
||||||
80
gnumake.h
Normal file
80
gnumake.h
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/* External interfaces usable by dynamic objects loaded into GNU Make.
|
||||||
|
--THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE--
|
||||||
|
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifndef _GNUMAKE_H_
|
||||||
|
#define _GNUMAKE_H_
|
||||||
|
|
||||||
|
/* Specify the location of elements read from makefiles. */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const char *filenm;
|
||||||
|
unsigned long lineno;
|
||||||
|
unsigned long offset;
|
||||||
|
} gmk_floc;
|
||||||
|
|
||||||
|
typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# ifdef GMK_BUILDING_MAKE
|
||||||
|
# define GMK_EXPORT __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define GMK_EXPORT __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define GMK_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Free memory returned by the gmk_expand() function. */
|
||||||
|
GMK_EXPORT void gmk_free (char *str);
|
||||||
|
|
||||||
|
/* Allocate memory in GNU make's context. */
|
||||||
|
GMK_EXPORT char *gmk_alloc (unsigned int len);
|
||||||
|
|
||||||
|
/* Run $(eval ...) on the provided string BUFFER. */
|
||||||
|
GMK_EXPORT void gmk_eval (const char *buffer, const gmk_floc *floc);
|
||||||
|
|
||||||
|
/* Run GNU make expansion on the provided string STR.
|
||||||
|
Returns an allocated buffer that the caller must free with gmk_free(). */
|
||||||
|
GMK_EXPORT char *gmk_expand (const char *str);
|
||||||
|
|
||||||
|
/* Register a new GNU make function NAME (maximum of 255 chars long).
|
||||||
|
When the function is expanded in the makefile, FUNC will be invoked with
|
||||||
|
the appropriate arguments.
|
||||||
|
|
||||||
|
The return value of FUNC must be either NULL, in which case it expands to
|
||||||
|
the empty string, or a pointer to the result of the expansion in a string
|
||||||
|
created by gmk_alloc(). GNU make will free the memory when it's done.
|
||||||
|
|
||||||
|
MIN_ARGS is the minimum number of arguments the function requires.
|
||||||
|
MAX_ARGS is the maximum number of arguments (or 0 if there's no maximum).
|
||||||
|
MIN_ARGS and MAX_ARGS may not exceed 255.
|
||||||
|
|
||||||
|
The FLAGS value may be GMK_FUNC_DEFAULT, or one or more of the following
|
||||||
|
flags OR'd together:
|
||||||
|
|
||||||
|
GMK_FUNC_NOEXPAND: the arguments to the function will be not be expanded
|
||||||
|
before FUNC is called.
|
||||||
|
*/
|
||||||
|
GMK_EXPORT void gmk_add_function (const char *name, gmk_func_ptr func,
|
||||||
|
unsigned int min_args, unsigned int max_args,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
#define GMK_FUNC_DEFAULT 0x00
|
||||||
|
#define GMK_FUNC_NOEXPAND 0x01
|
||||||
|
|
||||||
|
#endif /* _GNUMAKE_H_ */
|
||||||
159
guile.c
Normal file
159
guile.c
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
/* GNU Guile interface for GNU Make.
|
||||||
|
Copyright (C) 2011-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
|
#include "gnumake.h"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "dep.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
#include <libguile.h>
|
||||||
|
|
||||||
|
/* Pre-2.0 versions of Guile don't have a typedef for gsubr function types. */
|
||||||
|
#if SCM_MAJOR_VERSION < 2
|
||||||
|
# define GSUBR_TYPE SCM (*) ()
|
||||||
|
/* Guile 1.x doesn't really support i18n. */
|
||||||
|
# define EVAL_STRING(_s) scm_c_eval_string (_s)
|
||||||
|
#else
|
||||||
|
# define GSUBR_TYPE scm_t_subr
|
||||||
|
# define EVAL_STRING(_s) scm_eval_string (scm_from_utf8_string (_s))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SCM make_mod = SCM_EOL;
|
||||||
|
static SCM obj_to_str = SCM_EOL;
|
||||||
|
|
||||||
|
/* Convert an SCM object into a string. */
|
||||||
|
static char *
|
||||||
|
cvt_scm_to_str (SCM obj)
|
||||||
|
{
|
||||||
|
return scm_to_locale_string (scm_call_1 (obj_to_str, obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the GNU make expansion function. */
|
||||||
|
static SCM
|
||||||
|
guile_expand_wrapper (SCM obj)
|
||||||
|
{
|
||||||
|
char *str = cvt_scm_to_str (obj);
|
||||||
|
SCM ret;
|
||||||
|
char *res;
|
||||||
|
|
||||||
|
DB (DB_BASIC, (_("guile: Expanding '%s'\n"), str));
|
||||||
|
res = gmk_expand (str);
|
||||||
|
ret = scm_from_locale_string (res);
|
||||||
|
|
||||||
|
free (str);
|
||||||
|
free (res);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the GNU make eval function. */
|
||||||
|
static SCM
|
||||||
|
guile_eval_wrapper (SCM obj)
|
||||||
|
{
|
||||||
|
char *str = cvt_scm_to_str (obj);
|
||||||
|
|
||||||
|
DB (DB_BASIC, (_("guile: Evaluating '%s'\n"), str));
|
||||||
|
gmk_eval (str, 0);
|
||||||
|
|
||||||
|
return SCM_BOOL_F;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Invoked by scm_c_define_module(), in the context of the GNU make module. */
|
||||||
|
static void
|
||||||
|
guile_define_module (void *data UNUSED)
|
||||||
|
{
|
||||||
|
/* Ingest the predefined Guile module for GNU make. */
|
||||||
|
#include "gmk-default.h"
|
||||||
|
|
||||||
|
/* Register a subr for GNU make's eval capability. */
|
||||||
|
scm_c_define_gsubr ("gmk-expand", 1, 0, 0, (GSUBR_TYPE) guile_expand_wrapper);
|
||||||
|
|
||||||
|
/* Register a subr for GNU make's eval capability. */
|
||||||
|
scm_c_define_gsubr ("gmk-eval", 1, 0, 0, (GSUBR_TYPE) guile_eval_wrapper);
|
||||||
|
|
||||||
|
/* Define the rest of the module. */
|
||||||
|
scm_c_eval_string (GUILE_module_defn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize the GNU make Guile module. */
|
||||||
|
static void *
|
||||||
|
guile_init (void *arg UNUSED)
|
||||||
|
{
|
||||||
|
/* Define the module. */
|
||||||
|
make_mod = scm_c_define_module ("gnu make", guile_define_module, NULL);
|
||||||
|
|
||||||
|
/* Get a reference to the object-to-string translator, for later. */
|
||||||
|
obj_to_str = scm_variable_ref (scm_c_module_lookup (make_mod, "obj-to-str"));
|
||||||
|
|
||||||
|
/* Import the GNU make module exports into the generic space. */
|
||||||
|
scm_c_eval_string ("(use-modules (gnu make))");
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
|
internal_guile_eval (void *arg)
|
||||||
|
{
|
||||||
|
return cvt_scm_to_str (EVAL_STRING (arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is the function registered with make */
|
||||||
|
static char *
|
||||||
|
func_guile (const char *funcname UNUSED, unsigned int argc UNUSED, char **argv)
|
||||||
|
{
|
||||||
|
static int init = 0;
|
||||||
|
|
||||||
|
if (! init)
|
||||||
|
{
|
||||||
|
/* Initialize the Guile interpreter. */
|
||||||
|
scm_with_guile (guile_init, NULL);
|
||||||
|
init = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argv[0] && argv[0][0] != '\0')
|
||||||
|
return scm_with_guile (internal_guile_eval, argv[0]);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----- Public interface ----- */
|
||||||
|
|
||||||
|
/* We could send the flocp to define_new_function(), but since guile is
|
||||||
|
"kind of" built-in, that didn't seem so useful. */
|
||||||
|
int
|
||||||
|
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||||
|
{
|
||||||
|
/* Create a make function "guile". */
|
||||||
|
gmk_add_function ("guile", func_guile, 0, 1, GMK_FUNC_DEFAULT);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
14
hash.c
14
hash.c
@@ -14,10 +14,10 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))
|
#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n)))
|
||||||
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
||||||
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
||||||
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
||||||
@@ -26,7 +26,7 @@ static void hash_rehash __P((struct hash_table* ht));
|
|||||||
static unsigned long round_up_2 __P((unsigned long rough));
|
static unsigned long round_up_2 __P((unsigned long rough));
|
||||||
|
|
||||||
/* Implement double hashing with open addressing. The table size is
|
/* Implement double hashing with open addressing. The table size is
|
||||||
always a power of two. The secondary (`increment') hash function
|
always a power of two. The secondary ('increment') hash function
|
||||||
is forced to return an odd-value, in order to be relatively prime
|
is forced to return an odd-value, in order to be relatively prime
|
||||||
to the table size. This guarantees that the increment can
|
to the table size. This guarantees that the increment can
|
||||||
potentially hit every slot in the table during collision
|
potentially hit every slot in the table during collision
|
||||||
@@ -48,7 +48,7 @@ hash_init (struct hash_table *ht, unsigned long size,
|
|||||||
{
|
{
|
||||||
fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"),
|
fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"),
|
||||||
ht->ht_size * (unsigned long) sizeof (struct token *));
|
ht->ht_size * (unsigned long) sizeof (struct token *));
|
||||||
exit (1);
|
exit (MAKE_TROUBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
||||||
@@ -61,7 +61,7 @@ hash_init (struct hash_table *ht, unsigned long size,
|
|||||||
ht->ht_compare = hash_cmp;
|
ht->ht_compare = hash_cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load an array of items into `ht'. */
|
/* Load an array of items into 'ht'. */
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_load (struct hash_table *ht, void *item_table,
|
hash_load (struct hash_table *ht, void *item_table,
|
||||||
@@ -75,9 +75,9 @@ hash_load (struct hash_table *ht, void *item_table,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the address of the table slot matching `key'. If `key' is
|
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||||
not found, return the address of an empty slot suitable for
|
not found, return the address of an empty slot suitable for
|
||||||
inserting `key'. The caller is responsible for incrementing
|
inserting 'key'. The caller is responsible for incrementing
|
||||||
ht_fill on insertion. */
|
ht_fill on insertion. */
|
||||||
|
|
||||||
void **
|
void **
|
||||||
|
|||||||
12
hash.h
12
hash.h
@@ -28,9 +28,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
# undef __P
|
# undef __P
|
||||||
# define __P(protos) ()
|
# define __P(protos) ()
|
||||||
/* We can get away without defining `const' here only because in this file
|
/* We can get away without defining 'const' here only because in this file
|
||||||
it is used only inside the prototype for `fnmatch', which is elided in
|
it is used only inside the prototype for 'fnmatch', which is elided in
|
||||||
non-ANSI C where `const' is problematical. */
|
non-ANSI C where 'const' is problematical. */
|
||||||
#endif /* C++ or ANSI C. */
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
typedef unsigned long (*hash_func_t) __P((void const *key));
|
typedef unsigned long (*hash_func_t) __P((void const *key));
|
||||||
@@ -41,6 +41,9 @@ typedef void (*hash_map_arg_func_t) __P((void const *item, void *arg));
|
|||||||
struct hash_table
|
struct hash_table
|
||||||
{
|
{
|
||||||
void **ht_vec;
|
void **ht_vec;
|
||||||
|
hash_func_t ht_hash_1; /* primary hash function */
|
||||||
|
hash_func_t ht_hash_2; /* secondary hash function */
|
||||||
|
hash_cmp_func_t ht_compare; /* comparison function */
|
||||||
unsigned long ht_size; /* total number of slots (power of 2) */
|
unsigned long ht_size; /* total number of slots (power of 2) */
|
||||||
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
||||||
unsigned long ht_fill; /* items in table */
|
unsigned long ht_fill; /* items in table */
|
||||||
@@ -48,9 +51,6 @@ struct hash_table
|
|||||||
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
||||||
unsigned long ht_lookups; /* # of queries */
|
unsigned long ht_lookups; /* # of queries */
|
||||||
unsigned int ht_rehashes; /* # of times we've expanded table */
|
unsigned int ht_rehashes; /* # of times we've expanded table */
|
||||||
hash_func_t ht_hash_1; /* primary hash function */
|
|
||||||
hash_func_t ht_hash_2; /* secondary hash function */
|
|
||||||
hash_cmp_func_t ht_compare; /* comparison function */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||||
|
|||||||
158
implicit.c
158
implicit.c
@@ -1,7 +1,5 @@
|
|||||||
/* Implicit rule searching for GNU Make.
|
/* Implicit rule searching for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,7 +14,7 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
@@ -37,7 +35,7 @@ static int pattern_search (struct file *file, int archive,
|
|||||||
int
|
int
|
||||||
try_implicit_rule (struct file *file, unsigned int depth)
|
try_implicit_rule (struct file *file, unsigned int depth)
|
||||||
{
|
{
|
||||||
DBF (DB_IMPLICIT, _("Looking for an implicit rule for `%s'.\n"));
|
DBF (DB_IMPLICIT, _("Looking for an implicit rule for '%s'.\n"));
|
||||||
|
|
||||||
/* The order of these searches was previously reversed. My logic now is
|
/* The order of these searches was previously reversed. My logic now is
|
||||||
that since the non-archive search uses more information in the target
|
that since the non-archive search uses more information in the target
|
||||||
@@ -53,7 +51,7 @@ try_implicit_rule (struct file *file, unsigned int depth)
|
|||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
DBF (DB_IMPLICIT,
|
DBF (DB_IMPLICIT,
|
||||||
_("Looking for archive-member implicit rule for `%s'.\n"));
|
_("Looking for archive-member implicit rule for '%s'.\n"));
|
||||||
if (pattern_search (file, 1, depth, 0))
|
if (pattern_search (file, 1, depth, 0))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -74,8 +72,7 @@ get_next_word (const char *buffer, unsigned int *length)
|
|||||||
char c;
|
char c;
|
||||||
|
|
||||||
/* Skip any leading whitespace. */
|
/* Skip any leading whitespace. */
|
||||||
while (isblank ((unsigned char)*p))
|
NEXT_TOKEN (p);
|
||||||
++p;
|
|
||||||
|
|
||||||
beg = p;
|
beg = p;
|
||||||
c = *(p++);
|
c = *(p++);
|
||||||
@@ -219,13 +216,10 @@ pattern_search (struct file *file, int archive,
|
|||||||
struct file *int_file = 0;
|
struct file *int_file = 0;
|
||||||
|
|
||||||
/* List of dependencies found recursively. */
|
/* List of dependencies found recursively. */
|
||||||
struct patdeps *deplist
|
unsigned int max_deps = max_pattern_deps;
|
||||||
= xmalloc (max_pattern_deps * sizeof (struct patdeps));
|
struct patdeps *deplist = xmalloc (max_deps * sizeof (struct patdeps));
|
||||||
struct patdeps *pat = deplist;
|
struct patdeps *pat = deplist;
|
||||||
|
|
||||||
/* All the prerequisites actually found for a rule, after expansion. */
|
|
||||||
struct dep *deps;
|
|
||||||
|
|
||||||
/* Names of possible dependencies are constructed in this buffer. */
|
/* Names of possible dependencies are constructed in this buffer. */
|
||||||
char *depname = alloca (namelen + max_pattern_dep_length);
|
char *depname = alloca (namelen + max_pattern_dep_length);
|
||||||
|
|
||||||
@@ -251,11 +245,9 @@ pattern_search (struct file *file, int archive,
|
|||||||
int file_vars_initialized = 0;
|
int file_vars_initialized = 0;
|
||||||
|
|
||||||
/* Nonzero if we have matched a pattern-rule target
|
/* Nonzero if we have matched a pattern-rule target
|
||||||
that is not just `%'. */
|
that is not just '%'. */
|
||||||
int specific_rule_matched = 0;
|
int specific_rule_matched = 0;
|
||||||
|
|
||||||
struct dep dep_simple;
|
|
||||||
|
|
||||||
unsigned int ri; /* uninit checks OK */
|
unsigned int ri; /* uninit checks OK */
|
||||||
struct rule *rule;
|
struct rule *rule;
|
||||||
|
|
||||||
@@ -273,12 +265,15 @@ pattern_search (struct file *file, int archive,
|
|||||||
/* Set LASTSLASH to point at the last slash in FILENAME
|
/* Set LASTSLASH to point at the last slash in FILENAME
|
||||||
but not counting any slash at the end. (foo/bar/ counts as
|
but not counting any slash at the end. (foo/bar/ counts as
|
||||||
bar/ in directory foo/, not empty in directory foo/bar/.) */
|
bar/ in directory foo/, not empty in directory foo/bar/.) */
|
||||||
#ifdef VMS
|
|
||||||
lastslash = strrchr (filename, ']');
|
|
||||||
if (lastslash == 0)
|
|
||||||
lastslash = strrchr (filename, ':');
|
|
||||||
#else
|
|
||||||
lastslash = strrchr (filename, '/');
|
lastslash = strrchr (filename, '/');
|
||||||
|
#ifdef VMS
|
||||||
|
if (lastslash == NULL)
|
||||||
|
lastslash = strrchr (filename, ']');
|
||||||
|
if (lastslash == NULL)
|
||||||
|
lastslash = strrchr (filename, '>');
|
||||||
|
if (lastslash == NULL)
|
||||||
|
lastslash = strrchr (filename, ':');
|
||||||
|
#endif
|
||||||
#ifdef HAVE_DOS_PATHS
|
#ifdef HAVE_DOS_PATHS
|
||||||
/* Handle backslashes (possibly mixed with forward slashes)
|
/* Handle backslashes (possibly mixed with forward slashes)
|
||||||
and the case of "d:file". */
|
and the case of "d:file". */
|
||||||
@@ -289,7 +284,6 @@ pattern_search (struct file *file, int archive,
|
|||||||
if (lastslash == 0 && filename[0] && filename[1] == ':')
|
if (lastslash == 0 && filename[0] && filename[1] == ':')
|
||||||
lastslash = filename + 1;
|
lastslash = filename + 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (lastslash != 0 && lastslash[1] == '\0')
|
if (lastslash != 0 && lastslash[1] == '\0')
|
||||||
lastslash = 0;
|
lastslash = 0;
|
||||||
@@ -322,7 +316,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
{
|
{
|
||||||
const char *target = rule->targets[ti];
|
const char *target = rule->targets[ti];
|
||||||
const char *suffix = rule->suffixes[ti];
|
const char *suffix = rule->suffixes[ti];
|
||||||
int check_lastslash;
|
char check_lastslash;
|
||||||
|
|
||||||
/* Rules that can match any filename and are not terminal
|
/* Rules that can match any filename and are not terminal
|
||||||
are ignored if we're recursing, so that they cannot be
|
are ignored if we're recursing, so that they cannot be
|
||||||
@@ -346,10 +340,10 @@ pattern_search (struct file *file, int archive,
|
|||||||
if (lastslash)
|
if (lastslash)
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
check_lastslash = (strchr (target, ']') == 0
|
check_lastslash = strpbrk (target, "/]>:") == NULL;
|
||||||
&& strchr (target, ':') == 0);
|
|
||||||
#else
|
#else
|
||||||
check_lastslash = strchr (target, '/') == 0;
|
check_lastslash = strchr (target, '/') == 0;
|
||||||
|
#endif
|
||||||
#ifdef HAVE_DOS_PATHS
|
#ifdef HAVE_DOS_PATHS
|
||||||
/* Didn't find it yet: check for DOS-type directories. */
|
/* Didn't find it yet: check for DOS-type directories. */
|
||||||
if (check_lastslash)
|
if (check_lastslash)
|
||||||
@@ -357,7 +351,6 @@ pattern_search (struct file *file, int archive,
|
|||||||
char *b = strchr (target, '\\');
|
char *b = strchr (target, '\\');
|
||||||
check_lastslash = !(b || (target[0] && target[1] == ':'));
|
check_lastslash = !(b || (target[0] && target[1] == ':'));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (check_lastslash)
|
if (check_lastslash)
|
||||||
@@ -402,10 +395,10 @@ pattern_search (struct file *file, int archive,
|
|||||||
target in MATCHES. If several targets of the same rule match,
|
target in MATCHES. If several targets of the same rule match,
|
||||||
that rule will be in TRYRULES more than once. */
|
that rule will be in TRYRULES more than once. */
|
||||||
tryrules[nrules].rule = rule;
|
tryrules[nrules].rule = rule;
|
||||||
tryrules[nrules].matches = ti;
|
tryrules[nrules].matches = ti;
|
||||||
tryrules[nrules].stemlen = stemlen + (check_lastslash ? pathlen : 0);
|
tryrules[nrules].stemlen = stemlen + (check_lastslash ? pathlen : 0);
|
||||||
tryrules[nrules].order = nrules;
|
tryrules[nrules].order = nrules;
|
||||||
tryrules[nrules].checked_lastslash = check_lastslash;
|
tryrules[nrules].checked_lastslash = check_lastslash;
|
||||||
++nrules;
|
++nrules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,7 +437,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
for (ri = 0; ri < nrules; ri++)
|
for (ri = 0; ri < nrules; ri++)
|
||||||
{
|
{
|
||||||
struct dep *dep;
|
struct dep *dep;
|
||||||
int check_lastslash;
|
char check_lastslash;
|
||||||
unsigned int failed = 0;
|
unsigned int failed = 0;
|
||||||
int file_variables_set = 0;
|
int file_variables_set = 0;
|
||||||
unsigned int deps_found = 0;
|
unsigned int deps_found = 0;
|
||||||
@@ -488,7 +481,14 @@ pattern_search (struct file *file, int archive,
|
|||||||
dir = pathdir;
|
dir = pathdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBS (DB_IMPLICIT, (_("Trying pattern rule with stem `%.*s'.\n"),
|
if (stemlen > GET_PATH_MAX)
|
||||||
|
{
|
||||||
|
DBS (DB_IMPLICIT, (_("Stem too long: '%.*s'.\n"),
|
||||||
|
(int) stemlen, stem));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
DBS (DB_IMPLICIT, (_("Trying pattern rule with stem '%.*s'.\n"),
|
||||||
(int) stemlen, stem));
|
(int) stemlen, stem));
|
||||||
|
|
||||||
strncpy (stem_str, stem, stemlen);
|
strncpy (stem_str, stem, stemlen);
|
||||||
@@ -530,11 +530,9 @@ pattern_search (struct file *file, int archive,
|
|||||||
/* If we don't need a second expansion, just replace the %. */
|
/* If we don't need a second expansion, just replace the %. */
|
||||||
if (! dep->need_2nd_expansion)
|
if (! dep->need_2nd_expansion)
|
||||||
{
|
{
|
||||||
dep_simple = *dep;
|
|
||||||
dep_simple.next = 0;
|
|
||||||
p = strchr (nptr, '%');
|
p = strchr (nptr, '%');
|
||||||
if (p == 0)
|
if (p == 0)
|
||||||
dep_simple.name = nptr;
|
strcpy (depname, nptr);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *o = depname;
|
char *o = depname;
|
||||||
@@ -548,13 +546,19 @@ pattern_search (struct file *file, int archive,
|
|||||||
memcpy (o, stem_str, stemlen);
|
memcpy (o, stem_str, stemlen);
|
||||||
o += stemlen;
|
o += stemlen;
|
||||||
strcpy (o, p + 1);
|
strcpy (o, p + 1);
|
||||||
dep_simple.name = strcache_add (depname);
|
|
||||||
}
|
}
|
||||||
dl = &dep_simple;
|
|
||||||
|
/* Parse the expanded string. It might have wildcards. */
|
||||||
|
p = depname;
|
||||||
|
dl = PARSE_SIMPLE_SEQ (&p, struct dep);
|
||||||
|
for (d = dl; d != NULL; d = d->next)
|
||||||
|
{
|
||||||
|
++deps_found;
|
||||||
|
d->ignore_mtime = dep->ignore_mtime;
|
||||||
|
}
|
||||||
|
|
||||||
/* We've used up this dep, so next time get a new one. */
|
/* We've used up this dep, so next time get a new one. */
|
||||||
nptr = 0;
|
nptr = 0;
|
||||||
++deps_found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have to perform second expansion on this prereq. In an
|
/* We have to perform second expansion on this prereq. In an
|
||||||
@@ -570,6 +574,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
{
|
{
|
||||||
int add_dir = 0;
|
int add_dir = 0;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
struct dep **dptr;
|
||||||
|
|
||||||
nptr = get_next_word (nptr, &len);
|
nptr = get_next_word (nptr, &len);
|
||||||
if (nptr == 0)
|
if (nptr == 0)
|
||||||
@@ -612,6 +617,9 @@ pattern_search (struct file *file, int archive,
|
|||||||
add_dir = 1;
|
add_dir = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set up for the next word. */
|
||||||
|
nptr += len;
|
||||||
|
|
||||||
/* Initialize and set file variables if we haven't already
|
/* Initialize and set file variables if we haven't already
|
||||||
done so. */
|
done so. */
|
||||||
if (!file_vars_initialized)
|
if (!file_vars_initialized)
|
||||||
@@ -630,32 +638,47 @@ pattern_search (struct file *file, int archive,
|
|||||||
|
|
||||||
/* Perform the 2nd expansion. */
|
/* Perform the 2nd expansion. */
|
||||||
p = variable_expand_for_file (depname, file);
|
p = variable_expand_for_file (depname, file);
|
||||||
|
dptr = &dl;
|
||||||
|
|
||||||
/* Parse the expanded string. */
|
/* Parse the results into a deps list. */
|
||||||
dl = PARSE_FILE_SEQ (&p, struct dep, order_only ? '\0' : '|',
|
do
|
||||||
add_dir ? dir : NULL, 0);
|
|
||||||
|
|
||||||
for (d = dl; d != NULL; d = d->next)
|
|
||||||
{
|
{
|
||||||
++deps_found;
|
/* Parse the expanded string. */
|
||||||
if (order_only)
|
struct dep *dp = PARSE_FILE_SEQ (&p, struct dep,
|
||||||
d->ignore_mtime = 1;
|
order_only ? MAP_NUL : MAP_PIPE,
|
||||||
}
|
add_dir ? dir : NULL, PARSEFS_NONE);
|
||||||
|
*dptr = dp;
|
||||||
|
|
||||||
/* Set up for the next word. */
|
for (d = dp; d != NULL; d = d->next)
|
||||||
nptr += len;
|
{
|
||||||
|
++deps_found;
|
||||||
|
if (order_only)
|
||||||
|
d->ignore_mtime = 1;
|
||||||
|
dptr = &d->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we stopped due to an order-only token, note it. */
|
||||||
|
if (*p == '|')
|
||||||
|
{
|
||||||
|
order_only = 1;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (*p != '\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If there are more than max_pattern_deps prerequisites (due to
|
/* If there are more than max_pattern_deps prerequisites (due to
|
||||||
2nd expansion), reset it and realloc the arrays. */
|
2nd expansion), reset it and realloc the arrays. */
|
||||||
|
|
||||||
if (deps_found > max_pattern_deps)
|
if (deps_found > max_deps)
|
||||||
{
|
{
|
||||||
unsigned int l = pat - deplist;
|
unsigned int l = pat - deplist;
|
||||||
|
/* This might have changed due to recursion. */
|
||||||
|
max_pattern_deps = MAX(max_pattern_deps, deps_found);
|
||||||
|
max_deps = max_pattern_deps;
|
||||||
deplist = xrealloc (deplist,
|
deplist = xrealloc (deplist,
|
||||||
deps_found * sizeof (struct patdeps));
|
max_deps * sizeof (struct patdeps));
|
||||||
pat = deplist + l;
|
pat = deplist + l;
|
||||||
max_pattern_deps = deps_found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Go through the nameseq and handle each as a prereq name. */
|
/* Go through the nameseq and handle each as a prereq name. */
|
||||||
@@ -671,8 +694,8 @@ pattern_search (struct file *file, int archive,
|
|||||||
second pass either since we know that will fail. */
|
second pass either since we know that will fail. */
|
||||||
DBS (DB_IMPLICIT,
|
DBS (DB_IMPLICIT,
|
||||||
(is_rule
|
(is_rule
|
||||||
? _("Rejecting impossible rule prerequisite `%s'.\n")
|
? _("Rejecting impossible rule prerequisite '%s'.\n")
|
||||||
: _("Rejecting impossible implicit prerequisite `%s'.\n"),
|
: _("Rejecting impossible implicit prerequisite '%s'.\n"),
|
||||||
d->name));
|
d->name));
|
||||||
tryrules[ri].rule = 0;
|
tryrules[ri].rule = 0;
|
||||||
|
|
||||||
@@ -685,8 +708,8 @@ pattern_search (struct file *file, int archive,
|
|||||||
|
|
||||||
DBS (DB_IMPLICIT,
|
DBS (DB_IMPLICIT,
|
||||||
(is_rule
|
(is_rule
|
||||||
? _("Trying rule prerequisite `%s'.\n")
|
? _("Trying rule prerequisite '%s'.\n")
|
||||||
: _("Trying implicit prerequisite `%s'.\n"), d->name));
|
: _("Trying implicit prerequisite '%s'.\n"), d->name));
|
||||||
|
|
||||||
/* If this prereq is also explicitly mentioned for FILE,
|
/* If this prereq is also explicitly mentioned for FILE,
|
||||||
skip all tests below since it must be built no matter
|
skip all tests below since it must be built no matter
|
||||||
@@ -725,7 +748,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
if (vname)
|
if (vname)
|
||||||
{
|
{
|
||||||
DBS (DB_IMPLICIT,
|
DBS (DB_IMPLICIT,
|
||||||
(_("Found prerequisite `%s' as VPATH `%s'\n"),
|
(_("Found prerequisite '%s' as VPATH '%s'\n"),
|
||||||
d->name, vname));
|
d->name, vname));
|
||||||
(pat++)->name = d->name;
|
(pat++)->name = d->name;
|
||||||
continue;
|
continue;
|
||||||
@@ -739,7 +762,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
if (intermed_ok)
|
if (intermed_ok)
|
||||||
{
|
{
|
||||||
DBS (DB_IMPLICIT,
|
DBS (DB_IMPLICIT,
|
||||||
(_("Looking for a rule with intermediate file `%s'.\n"),
|
(_("Looking for a rule with intermediate file '%s'.\n"),
|
||||||
d->name));
|
d->name));
|
||||||
|
|
||||||
if (int_file == 0)
|
if (int_file == 0)
|
||||||
@@ -755,8 +778,8 @@ pattern_search (struct file *file, int archive,
|
|||||||
pat->pattern = int_file->name;
|
pat->pattern = int_file->name;
|
||||||
int_file->name = d->name;
|
int_file->name = d->name;
|
||||||
pat->file = int_file;
|
pat->file = int_file;
|
||||||
(pat++)->name = d->name;
|
|
||||||
int_file = 0;
|
int_file = 0;
|
||||||
|
(pat++)->name = d->name;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,8 +800,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Free the ns chain. */
|
/* Free the ns chain. */
|
||||||
if (dl != &dep_simple)
|
free_dep_chain (dl);
|
||||||
free_dep_chain (dl);
|
|
||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
break;
|
break;
|
||||||
@@ -788,17 +810,14 @@ pattern_search (struct file *file, int archive,
|
|||||||
|
|
||||||
file->stem = 0;
|
file->stem = 0;
|
||||||
|
|
||||||
/* This rule is no longer `in use' for recursive searches. */
|
/* This rule is no longer 'in use' for recursive searches. */
|
||||||
rule->in_use = 0;
|
rule->in_use = 0;
|
||||||
|
|
||||||
if (! failed)
|
if (! failed)
|
||||||
/* This pattern rule does apply. Stop looking for one. */
|
/* This pattern rule does apply. Stop looking for one. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* This pattern rule does not apply. If some of its dependencies
|
/* This pattern rule does not apply. Keep looking. */
|
||||||
succeeded, free the data structure describing them. */
|
|
||||||
/* free_idep_chain (deps); */
|
|
||||||
deps = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we found an applicable rule without intermediate files, don't try
|
/* If we found an applicable rule without intermediate files, don't try
|
||||||
@@ -844,9 +863,10 @@ pattern_search (struct file *file, int archive,
|
|||||||
|
|
||||||
/* We don't want to delete an intermediate file that happened
|
/* We don't want to delete an intermediate file that happened
|
||||||
to be a prerequisite of some (other) target. Mark it as
|
to be a prerequisite of some (other) target. Mark it as
|
||||||
precious. */
|
secondary. We don't want it to be precious as that disables
|
||||||
|
DELETE_ON_ERROR etc. */
|
||||||
if (f != 0)
|
if (f != 0)
|
||||||
f->precious = 1;
|
f->secondary = 1;
|
||||||
else
|
else
|
||||||
f = enter_file (imf->name);
|
f = enter_file (imf->name);
|
||||||
|
|
||||||
@@ -890,8 +910,8 @@ pattern_search (struct file *file, int archive,
|
|||||||
/* If the file actually existed (was not an intermediate file), and
|
/* If the file actually existed (was not an intermediate file), and
|
||||||
the rule that found it was a terminal one, then we want to mark
|
the rule that found it was a terminal one, then we want to mark
|
||||||
the found file so that it will not have implicit rule search done
|
the found file so that it will not have implicit rule search done
|
||||||
for it. If we are not entering a `struct file' for it now, we
|
for it. If we are not entering a 'struct file' for it now, we
|
||||||
indicate this with the `changed' flag. */
|
indicate this with the 'changed' flag. */
|
||||||
if (dep->file == 0)
|
if (dep->file == 0)
|
||||||
dep->changed = 1;
|
dep->changed = 1;
|
||||||
else
|
else
|
||||||
@@ -935,7 +955,7 @@ pattern_search (struct file *file, int archive,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If this rule builds other targets, too, put the others into FILE's
|
/* If this rule builds other targets, too, put the others into FILE's
|
||||||
`also_make' member. */
|
'also_make' member. */
|
||||||
|
|
||||||
if (rule->num > 1)
|
if (rule->num > 1)
|
||||||
for (ri = 0; ri < rule->num; ++ri)
|
for (ri = 0; ri < rule->num; ++ri)
|
||||||
|
|||||||
124
job.h
124
job.h
@@ -1,7 +1,5 @@
|
|||||||
/* Definitions for managing subprocesses in GNU Make.
|
/* Definitions for managing subprocesses in GNU Make.
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992-2016 Free Software Foundation, Inc.
|
||||||
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
|
||||||
Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,8 +14,7 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#ifndef SEEN_JOB_H
|
#include "output.h"
|
||||||
#define SEEN_JOB_H
|
|
||||||
|
|
||||||
#ifdef HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
@@ -27,8 +24,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* How to set close-on-exec for a file descriptor. */
|
/* How to set close-on-exec for a file descriptor. */
|
||||||
|
|
||||||
#if !defined F_SETFD
|
#if !defined(F_SETFD) || !defined(F_GETFD)
|
||||||
# define CLOSE_ON_EXEC(_d)
|
# ifdef WINDOWS32
|
||||||
|
# define CLOSE_ON_EXEC(_d) process_noinherit(_d)
|
||||||
|
# else
|
||||||
|
# define CLOSE_ON_EXEC(_d)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifndef FD_CLOEXEC
|
# ifndef FD_CLOEXEC
|
||||||
# define FD_CLOEXEC 1
|
# define FD_CLOEXEC 1
|
||||||
@@ -36,38 +37,86 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
|
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_OUTPUT_SYNC
|
||||||
|
# define RECORD_SYNC_MUTEX(m) \
|
||||||
|
O (error, NILF, \
|
||||||
|
_("-O[TYPE] (--output-sync[=TYPE]) is not configured for this build."));
|
||||||
|
#else
|
||||||
|
# ifdef WINDOWS32
|
||||||
|
/* For emulations in w32/compat/posixfcn.c. */
|
||||||
|
# define F_GETFD 1
|
||||||
|
# define F_SETLKW 2
|
||||||
|
/* Implementation note: None of the values of l_type below can be zero
|
||||||
|
-- they are compared with a static instance of the struct, so zero
|
||||||
|
means unknown/invalid, see w32/compat/posixfcn.c. */
|
||||||
|
# define F_WRLCK 1
|
||||||
|
# define F_UNLCK 2
|
||||||
|
|
||||||
|
struct flock
|
||||||
|
{
|
||||||
|
short l_type;
|
||||||
|
short l_whence;
|
||||||
|
off_t l_start;
|
||||||
|
off_t l_len;
|
||||||
|
pid_t l_pid;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This type is actually a HANDLE, but we want to avoid including
|
||||||
|
windows.h as much as possible. */
|
||||||
|
typedef intptr_t sync_handle_t;
|
||||||
|
|
||||||
|
/* Public functions emulated/provided in posixfcn.c. */
|
||||||
|
int fcntl (intptr_t fd, int cmd, ...);
|
||||||
|
intptr_t create_mutex (void);
|
||||||
|
int same_stream (FILE *f1, FILE *f2);
|
||||||
|
|
||||||
|
# define RECORD_SYNC_MUTEX(m) record_sync_mutex(m)
|
||||||
|
void record_sync_mutex (const char *str);
|
||||||
|
void prepare_mutex_handle_string (intptr_t hdl);
|
||||||
|
# else /* !WINDOWS32 */
|
||||||
|
|
||||||
|
typedef int sync_handle_t; /* file descriptor */
|
||||||
|
|
||||||
|
# define RECORD_SYNC_MUTEX(m) (void)(m)
|
||||||
|
|
||||||
|
# endif
|
||||||
|
#endif /* !NO_OUTPUT_SYNC */
|
||||||
|
|
||||||
/* Structure describing a running or dead child process. */
|
/* Structure describing a running or dead child process. */
|
||||||
|
|
||||||
struct child
|
struct child
|
||||||
{
|
{
|
||||||
struct child *next; /* Link in the chain. */
|
struct child *next; /* Link in the chain. */
|
||||||
|
|
||||||
struct file *file; /* File being remade. */
|
struct file *file; /* File being remade. */
|
||||||
|
|
||||||
char **environment; /* Environment for commands. */
|
char **environment; /* Environment for commands. */
|
||||||
|
|
||||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
|
||||||
unsigned int command_line; /* Index into above. */
|
|
||||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
|
||||||
|
|
||||||
pid_t pid; /* Child process's ID number. */
|
|
||||||
#ifdef VMS
|
|
||||||
int efn; /* Completion event flag number */
|
|
||||||
int cstatus; /* Completion status */
|
|
||||||
char *comname; /* Temporary command file name */
|
|
||||||
#endif
|
|
||||||
char *sh_batch_file; /* Script file for shell commands */
|
char *sh_batch_file; /* Script file for shell commands */
|
||||||
unsigned int remote:1; /* Nonzero if executing remotely. */
|
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||||
|
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||||
|
|
||||||
unsigned int noerror:1; /* Nonzero if commands contained a `-'. */
|
#ifdef VMS
|
||||||
|
char *comname; /* Temporary command file name */
|
||||||
|
int efn; /* Completion event flag number */
|
||||||
|
int cstatus; /* Completion status */
|
||||||
|
int vms_launch_status; /* non-zero if lib$spawn, etc failed */
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
unsigned int command_line; /* Index into command_lines. */
|
||||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
struct output output; /* Output for this child. */
|
||||||
unsigned int dontcare:1; /* Saved dontcare flag. */
|
pid_t pid; /* Child process's ID number. */
|
||||||
|
unsigned int remote:1; /* Nonzero if executing remotely. */
|
||||||
|
unsigned int noerror:1; /* Nonzero if commands contained a '-'. */
|
||||||
|
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||||
|
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||||
|
unsigned int recursive:1; /* Nonzero for recursive command ('+' etc.) */
|
||||||
|
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct child *children;
|
extern struct child *children;
|
||||||
|
|
||||||
|
/* A signal handler for SIGCHLD, if needed. */
|
||||||
|
RETSIGTYPE child_handler (int sig);
|
||||||
int is_bourne_compatible_shell(const char *path);
|
int is_bourne_compatible_shell(const char *path);
|
||||||
void new_job (struct file *file);
|
void new_job (struct file *file);
|
||||||
void reap_children (int block, int err);
|
void reap_children (int block, int err);
|
||||||
@@ -75,19 +124,22 @@ void start_waiting_jobs (void);
|
|||||||
|
|
||||||
char **construct_command_argv (char *line, char **restp, struct file *file,
|
char **construct_command_argv (char *line, char **restp, struct file *file,
|
||||||
int cmd_flags, char** batch_file);
|
int cmd_flags, char** batch_file);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
int child_execute_job (char *argv, struct child *child);
|
int child_execute_job (struct child *child, char *argv);
|
||||||
#elif defined(__EMX__)
|
|
||||||
int child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp);
|
|
||||||
#else
|
#else
|
||||||
void child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp);
|
# define FD_STDIN (fileno (stdin))
|
||||||
|
# define FD_STDOUT (fileno (stdout))
|
||||||
|
# define FD_STDERR (fileno (stderr))
|
||||||
|
int child_execute_job (struct output *out, int good_stdin, char **argv, char **envp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AMIGA
|
#ifdef _AMIGA
|
||||||
void exec_command (char **argv);
|
void exec_command (char **argv) __attribute__ ((noreturn));
|
||||||
#elif defined(__EMX__)
|
#elif defined(__EMX__)
|
||||||
int exec_command (char **argv, char **envp);
|
int exec_command (char **argv, char **envp);
|
||||||
#else
|
#else
|
||||||
void exec_command (char **argv, char **envp);
|
void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern unsigned int job_slots_used;
|
extern unsigned int job_slots_used;
|
||||||
@@ -96,14 +148,12 @@ void block_sigs (void);
|
|||||||
#ifdef POSIX
|
#ifdef POSIX
|
||||||
void unblock_sigs (void);
|
void unblock_sigs (void);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SIGSETMASK
|
#ifdef HAVE_SIGSETMASK
|
||||||
extern int fatal_signal_mask;
|
extern int fatal_signal_mask;
|
||||||
#define unblock_sigs() sigsetmask (0)
|
#define unblock_sigs() sigsetmask (0)
|
||||||
#else
|
#else
|
||||||
#define unblock_sigs()
|
#define unblock_sigs()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern unsigned int jobserver_tokens;
|
extern unsigned int jobserver_tokens;
|
||||||
|
|
||||||
#endif /* SEEN_JOB_H */
|
|
||||||
|
|||||||
267
load.c
Normal file
267
load.c
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
/* Loading dynamic objects for GNU Make.
|
||||||
|
Copyright (C) 2012-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#if MAKE_LOAD
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#define SYMBOL_EXTENSION "_gmk_setup"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
/* Tru64 V4.0 does not have this flag */
|
||||||
|
#ifndef RTLD_GLOBAL
|
||||||
|
# define RTLD_GLOBAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct load_list
|
||||||
|
{
|
||||||
|
struct load_list *next;
|
||||||
|
const char *name;
|
||||||
|
void *dlp;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct load_list *loaded_syms = NULL;
|
||||||
|
|
||||||
|
static load_func_t
|
||||||
|
load_object (const gmk_floc *flocp, int noerror,
|
||||||
|
const char *ldname, const char *symname)
|
||||||
|
{
|
||||||
|
static void *global_dl = NULL;
|
||||||
|
load_func_t symp;
|
||||||
|
|
||||||
|
if (! global_dl)
|
||||||
|
{
|
||||||
|
global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
|
||||||
|
if (! global_dl)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
OS (fatal, flocp, _("Failed to open global symbol table: %s"), err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
symp = (load_func_t) dlsym (global_dl, symname);
|
||||||
|
if (! symp)
|
||||||
|
{
|
||||||
|
struct load_list *new;
|
||||||
|
void *dlp = NULL;
|
||||||
|
|
||||||
|
/* If the path has no "/", try the current directory first. */
|
||||||
|
if (! strchr (ldname, '/')
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
&& ! strchr (ldname, '\\')
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL);
|
||||||
|
|
||||||
|
/* If we haven't opened it yet, try the default search path. */
|
||||||
|
if (! dlp)
|
||||||
|
dlp = dlopen (ldname, RTLD_LAZY|RTLD_GLOBAL);
|
||||||
|
|
||||||
|
/* Still no? Then fail. */
|
||||||
|
if (! dlp)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
if (noerror)
|
||||||
|
DB (DB_BASIC, ("%s", err));
|
||||||
|
else
|
||||||
|
OS (error, flocp, "%s", err);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Assert that the GPL license symbol is defined. */
|
||||||
|
symp = (load_func_t) dlsym (dlp, "plugin_is_GPL_compatible");
|
||||||
|
if (! symp)
|
||||||
|
OS (fatal, flocp,
|
||||||
|
_("Loaded object %s is not declared to be GPL compatible"),
|
||||||
|
ldname);
|
||||||
|
|
||||||
|
symp = (load_func_t) dlsym (dlp, symname);
|
||||||
|
if (! symp)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
OSSS (fatal, flocp, _("Failed to load symbol %s from %s: %s"),
|
||||||
|
symname, ldname, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add this symbol to a trivial lookup table. This is not efficient but
|
||||||
|
it's highly unlikely we'll be loading lots of objects, and we only
|
||||||
|
need it to look them up on unload, if we rebuild them. */
|
||||||
|
new = xmalloc (sizeof (struct load_list));
|
||||||
|
new->name = xstrdup (ldname);
|
||||||
|
new->dlp = dlp;
|
||||||
|
new->next = loaded_syms;
|
||||||
|
loaded_syms = new;
|
||||||
|
}
|
||||||
|
|
||||||
|
return symp;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const gmk_floc *flocp, const char **ldname, int noerror)
|
||||||
|
{
|
||||||
|
int nmlen = strlen (*ldname);
|
||||||
|
char *new = alloca (nmlen + CSTRLEN (SYMBOL_EXTENSION) + 1);
|
||||||
|
char *symname = NULL;
|
||||||
|
char *loaded;
|
||||||
|
const char *fp;
|
||||||
|
int r;
|
||||||
|
load_func_t symp;
|
||||||
|
|
||||||
|
/* Break the input into an object file name and a symbol name. If no symbol
|
||||||
|
name was provided, compute one from the object file name. */
|
||||||
|
fp = strchr (*ldname, '(');
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
const char *ep;
|
||||||
|
|
||||||
|
/* There's an open paren, so see if there's a close paren: if so use
|
||||||
|
that as the symbol name. We can't have whitespace: it would have
|
||||||
|
been chopped up before this function is called. */
|
||||||
|
ep = strchr (fp+1, ')');
|
||||||
|
if (ep && ep[1] == '\0')
|
||||||
|
{
|
||||||
|
int l = fp - *ldname;;
|
||||||
|
|
||||||
|
++fp;
|
||||||
|
if (fp == ep)
|
||||||
|
OS (fatal, flocp, _("Empty symbol name for load: %s"), *ldname);
|
||||||
|
|
||||||
|
/* Make a copy of the ldname part. */
|
||||||
|
memcpy (new, *ldname, l);
|
||||||
|
new[l] = '\0';
|
||||||
|
*ldname = new;
|
||||||
|
nmlen = l;
|
||||||
|
|
||||||
|
/* Make a copy of the symbol name part. */
|
||||||
|
symname = new + l + 1;
|
||||||
|
memcpy (symname, fp, ep - fp);
|
||||||
|
symname[ep - fp] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add this name to the string cache so it can be reused later. */
|
||||||
|
*ldname = strcache_add (*ldname);
|
||||||
|
|
||||||
|
/* If this object has been loaded, we're done. */
|
||||||
|
loaded = allocated_variable_expand ("$(.LOADED)");
|
||||||
|
fp = strstr (loaded, *ldname);
|
||||||
|
r = fp && (fp==loaded || fp[-1]==' ') && (fp[nmlen]=='\0' || fp[nmlen]==' ');
|
||||||
|
if (r)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
|
/* If we didn't find a symbol name yet, construct it from the ldname. */
|
||||||
|
if (! symname)
|
||||||
|
{
|
||||||
|
char *p = new;
|
||||||
|
|
||||||
|
fp = strrchr (*ldname, '/');
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
const char *fp2 = strchr (fp, '\\');
|
||||||
|
|
||||||
|
if (fp2 > fp)
|
||||||
|
fp = fp2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fp = strrchr (*ldname, '\\');
|
||||||
|
/* The (improbable) case of d:foo. */
|
||||||
|
if (fp && *fp && fp[1] == ':')
|
||||||
|
fp++;
|
||||||
|
#endif
|
||||||
|
if (!fp)
|
||||||
|
fp = *ldname;
|
||||||
|
else
|
||||||
|
++fp;
|
||||||
|
while (isalnum (*fp) || *fp == '_')
|
||||||
|
*(p++) = *(fp++);
|
||||||
|
strcpy (p, SYMBOL_EXTENSION);
|
||||||
|
symname = new;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB (DB_VERBOSE, (_("Loading symbol %s from %s\n"), symname, *ldname));
|
||||||
|
|
||||||
|
/* Load it! */
|
||||||
|
symp = load_object (flocp, noerror, *ldname, symname);
|
||||||
|
if (! symp)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Invoke the symbol. */
|
||||||
|
r = (*symp) (flocp);
|
||||||
|
|
||||||
|
/* If it succeeded, add the load file to the loaded variable. */
|
||||||
|
if (r > 0)
|
||||||
|
{
|
||||||
|
size_t loadlen = strlen (loaded);
|
||||||
|
char *newval = alloca (loadlen + strlen (*ldname) + 2);
|
||||||
|
/* Don't add a space if it's empty. */
|
||||||
|
if (loadlen)
|
||||||
|
{
|
||||||
|
memcpy (newval, loaded, loadlen);
|
||||||
|
newval[loadlen++] = ' ';
|
||||||
|
}
|
||||||
|
strcpy (&newval[loadlen], *ldname);
|
||||||
|
do_variable_definition (flocp, ".LOADED", newval, o_default, f_simple, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:
|
||||||
|
free (loaded);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unload_file (const char *name)
|
||||||
|
{
|
||||||
|
struct load_list *d;
|
||||||
|
|
||||||
|
for (d = loaded_syms; d != NULL; d = d->next)
|
||||||
|
if (streq (d->name, name) && d->dlp)
|
||||||
|
{
|
||||||
|
if (dlclose (d->dlp))
|
||||||
|
perror_with_name ("dlclose", d->name);
|
||||||
|
d->dlp = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const gmk_floc *flocp, const char **ldname UNUSED, int noerror)
|
||||||
|
{
|
||||||
|
if (! noerror)
|
||||||
|
O (fatal, flocp,
|
||||||
|
_("The 'load' operation is not supported on this platform."));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unload_file (const char *name UNUSED)
|
||||||
|
{
|
||||||
|
O (fatal, NILF, "INTERNAL: Cannot unload when load is not supported!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MAKE_LOAD */
|
||||||
70
loadapi.c
Normal file
70
loadapi.c
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/* API for GNU Make dynamic objects.
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
|
#include "dep.h"
|
||||||
|
|
||||||
|
/* Allocate a buffer in our context, so we can free it. */
|
||||||
|
char *
|
||||||
|
gmk_alloc (unsigned int len)
|
||||||
|
{
|
||||||
|
return xmalloc (len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Free a buffer returned by gmk_expand(). */
|
||||||
|
void
|
||||||
|
gmk_free (char *s)
|
||||||
|
{
|
||||||
|
free (s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Evaluate a buffer as make syntax.
|
||||||
|
Ideally eval_buffer() will take const char *, but not yet. */
|
||||||
|
void
|
||||||
|
gmk_eval (const char *buffer, const gmk_floc *floc)
|
||||||
|
{
|
||||||
|
/* Preserve existing variable buffer context. */
|
||||||
|
char *pbuf;
|
||||||
|
unsigned int plen;
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
install_variable_buffer (&pbuf, &plen);
|
||||||
|
|
||||||
|
s = xstrdup (buffer);
|
||||||
|
eval_buffer (s, floc);
|
||||||
|
free (s);
|
||||||
|
|
||||||
|
restore_variable_buffer (pbuf, plen);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Expand a string and return an allocated buffer.
|
||||||
|
Caller must call gmk_free() with this buffer. */
|
||||||
|
char *
|
||||||
|
gmk_expand (const char *ref)
|
||||||
|
{
|
||||||
|
return allocated_variable_expand (ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Register a function to be called from makefiles. */
|
||||||
|
void
|
||||||
|
gmk_add_function (const char *name, gmk_func_ptr func,
|
||||||
|
unsigned int min, unsigned int max, unsigned int flags)
|
||||||
|
{
|
||||||
|
define_new_function (reading_file, name, min, max, flags, func);
|
||||||
|
}
|
||||||
201
maintMakefile
201
maintMakefile
@@ -1,9 +1,29 @@
|
|||||||
# Maintainer-only makefile segment. This contains things that are relevant
|
# Maintainer-only makefile segment. This contains things that are relevant
|
||||||
# only if you have the full copy of the GNU make sources from the CVS
|
# only if you have the full copy of the GNU make sources from the Git
|
||||||
# tree, not a dist copy.
|
# tree, not a dist copy.
|
||||||
|
|
||||||
|
BUGLIST := bug-make@gnu.org
|
||||||
|
|
||||||
|
# These are related to my personal setup.
|
||||||
|
GPG_FINGERPRINT := 6338B6D4
|
||||||
|
|
||||||
|
# SRCROOTDIR is just a handy location to keep source files in
|
||||||
|
SRCROOTDIR ?= $(HOME)/src
|
||||||
|
|
||||||
|
# Where the gnulib project has been locally cloned
|
||||||
|
GNULIBDIR ?= $(SRCROOTDIR)/gnulib
|
||||||
|
|
||||||
|
# Where to put the CVS checkout of the GNU web repository
|
||||||
|
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
||||||
|
|
||||||
|
# Where to put the CVS checkout of the GNU make web repository
|
||||||
|
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
||||||
|
|
||||||
# We like mondo-warnings!
|
# We like mondo-warnings!
|
||||||
AM_CFLAGS += -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
|
AM_CFLAGS += -Wall -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
|
||||||
|
|
||||||
|
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
||||||
|
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||||
|
|
||||||
# I want this one but I have to wait for the const cleanup!
|
# I want this one but I have to wait for the const cleanup!
|
||||||
# -Wwrite-strings
|
# -Wwrite-strings
|
||||||
@@ -19,6 +39,10 @@ MTEMPLATES = Makefile.DOS SMakefile
|
|||||||
# These are built as a side-effect of the dist rule
|
# These are built as a side-effect of the dist rule
|
||||||
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
||||||
|
|
||||||
|
# Create preprocessor output files--GCC specific!
|
||||||
|
%.i : %.c
|
||||||
|
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
||||||
|
|
||||||
# General rule for turning a .template into a regular file.
|
# General rule for turning a .template into a regular file.
|
||||||
#
|
#
|
||||||
$(TEMPLATES) : % : %.template Makefile
|
$(TEMPLATES) : % : %.template Makefile
|
||||||
@@ -80,50 +104,54 @@ DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
|||||||
< $$f; \
|
< $$f; \
|
||||||
done) > $@
|
done) > $@
|
||||||
|
|
||||||
# Get rid of everything "else".
|
# Cleaning
|
||||||
#
|
|
||||||
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
|
||||||
|
|
||||||
CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
GIT := git
|
||||||
build.sh.in .deps .dep_segment ABOUT-NLS \
|
|
||||||
ansi2knr.*
|
|
||||||
|
|
||||||
# This rule tries to clean the tree right down to how it looks when you do a
|
# git-clean: Clean all "ignored" files. Leave untracked files.
|
||||||
# virgin CVS checkout.
|
# git-very-clean: Clean all files that aren't stored in source control.
|
||||||
|
|
||||||
# This target is potentially dangerous since it removes _ANY FILE_ that
|
.PHONY: git-clean git-very-clean
|
||||||
# is not in CVS. Including files you might mean to add to CVS but
|
git-clean:
|
||||||
# haven't yet... I only use this in subdirectories where it's unlikely
|
-$(GIT) clean -fdX
|
||||||
# we have any new files. Still... be careful!!
|
git-very-clean: git-clean
|
||||||
|
-$(GIT) clean -fd
|
||||||
cvsclean = $(PERL) -e '$$k{CVS} = 1; open(E,"< CVS/Entries") || die "CVS/Entries: $$!\n"; while (defined ($$_ = <E>)) { m%^/([^/]*)% or next; $$k{$$1} = 1; } close(E) || die "CVS/Entries: $$!\n"; opendir(D, ".") || die ".: $$!\n"; while (defined ($$_ = readdir(D))) { -f $$_ && ! exists $$k{$$_} && unlink($$_); } closedir(D) || die ".: $$!\n";'
|
|
||||||
|
|
||||||
.PHONY: cvs-clean
|
|
||||||
cvs-clean: maintainer-clean
|
|
||||||
-rm -rf *~ $(CVS-CLEAN-FILES)
|
|
||||||
-cd config && $(cvsclean)
|
|
||||||
-cd po && $(cvsclean)
|
|
||||||
-cd doc && $(cvsclean)
|
|
||||||
-cd glob && $(cvsclean)
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
#
|
## ---------------------- ##
|
||||||
# The sections below were stolen from the Makefile.maint used by fileutils,
|
## Generating ChangeLog. ##
|
||||||
# sh-utils, textutils, CPPI, Bison, and Autoconf.
|
## ---------------------- ##
|
||||||
|
|
||||||
|
gl2cl-date := 2013-10-10
|
||||||
|
gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
|
||||||
|
|
||||||
|
# Rebuild the changelog whenever a new commit is added
|
||||||
|
ChangeLog: .check-git-HEAD
|
||||||
|
if test -f '$(gl2cl)'; then \
|
||||||
|
'$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \
|
||||||
|
else \
|
||||||
|
echo "WARNING: $(gl2cl) is not available. No $@ generated."; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
.PHONY: .check-git-HEAD
|
||||||
|
.check-git-HEAD:
|
||||||
|
sha="`git rev-parse HEAD`"; \
|
||||||
|
[ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|
||||||
|
|| echo "$$sha" > '$@'
|
||||||
|
|
||||||
|
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
## Updating files. ##
|
## Updating files. ##
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
|
|
||||||
WGET = wget --passive-ftp -nv
|
WGET = wget --passive-ftp -np -nv
|
||||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||||
|
|
||||||
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||||
echo $(target) is unchanged; rm -f $(target).t; \
|
echo $(target) is unchanged; rm -f $(target).t; \
|
||||||
else \
|
else \
|
||||||
mv $(target).t $(target); \
|
mv -f $(target).t $(target); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ------------------- #
|
# ------------------- #
|
||||||
@@ -135,6 +163,7 @@ move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
|||||||
# http://translation.sf.net/maint/
|
# http://translation.sf.net/maint/
|
||||||
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||||
|
|
||||||
|
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||||
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
||||||
.PHONY: do-po-update po-update
|
.PHONY: do-po-update po-update
|
||||||
do-po-update:
|
do-po-update:
|
||||||
@@ -142,8 +171,9 @@ do-po-update:
|
|||||||
&& rm -rf "$$tmppo" \
|
&& rm -rf "$$tmppo" \
|
||||||
&& mkdir "$$tmppo" \
|
&& mkdir "$$tmppo" \
|
||||||
&& (cd "$$tmppo" \
|
&& (cd "$$tmppo" \
|
||||||
&& $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) \
|
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
|
||||||
&& cp "$$tmppo"/*.po $(top_srcdir)/po && rm -rf "$$tmppo"
|
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
||||||
|
&& rm -rf "$$tmppo"
|
||||||
cd po && $(MAKE) update-po
|
cd po && $(MAKE) update-po
|
||||||
$(MAKE) po-check
|
$(MAKE) po-check
|
||||||
|
|
||||||
@@ -192,11 +222,49 @@ scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub
|
|||||||
update: po-update scm-update
|
update: po-update scm-update
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------- #
|
||||||
|
# Alternative configuration checks. #
|
||||||
|
# ---------------------------------- #
|
||||||
|
|
||||||
|
.PHONY: check-alt-config
|
||||||
|
check-alt-config: \
|
||||||
|
checkcfg.--disable-job-server \
|
||||||
|
checkcfg.--disable-load \
|
||||||
|
checkcfg.--without-guile \
|
||||||
|
checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \
|
||||||
|
checkcfg.CPPFLAGS^-DNO_ARCHIVES
|
||||||
|
|
||||||
|
# Trick GNU make so it doesn't run the submake as a recursive make.
|
||||||
|
NR_MAKE = $(MAKE)
|
||||||
|
|
||||||
|
# Check builds both with build.sh and with make
|
||||||
|
checkcfg.%: distdir
|
||||||
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||||
|
@exec >'checkcfg.$*.log' 2>&1; \
|
||||||
|
rm -rf $(distdir)/_build \
|
||||||
|
&& mkdir $(distdir)/_build \
|
||||||
|
&& cd $(distdir)/_build \
|
||||||
|
&& echo "Testing configure with $(subst ^,=,$*)" \
|
||||||
|
&& ../configure --srcdir=.. $(subst ^,=,$*) \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
CFLAGS='$(AM_CFLAGS)' \
|
||||||
|
&& ./build.sh \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) check \
|
||||||
|
&& rm -f *.o make \
|
||||||
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) check
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
## Sanity checks. ##
|
## Sanity checks. ##
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
|
|
||||||
# Checks that don't require cvs. Run `changelog-check' last as
|
# Before we build a distribution be sure we run our local checks
|
||||||
|
#distdir: local-check
|
||||||
|
|
||||||
|
.PHONY: local-check po-check changelog-check
|
||||||
|
|
||||||
|
# Checks that don't require Git. Run 'changelog-check' last as
|
||||||
# previous test may reveal problems requiring new ChangeLog entries.
|
# previous test may reveal problems requiring new ChangeLog entries.
|
||||||
local-check: po-check changelog-check
|
local-check: po-check changelog-check
|
||||||
|
|
||||||
@@ -211,15 +279,70 @@ changelog-check:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||||
# Ignore make.h; it defines _().
|
# Ignore makeint.h; it defines _().
|
||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||||
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "make.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
|
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
## --------------- ##
|
||||||
|
## Generate docs. ##
|
||||||
|
## --------------- ##
|
||||||
|
|
||||||
|
.PHONY: update-makeweb gendocs
|
||||||
|
|
||||||
|
CVS = cvs
|
||||||
|
|
||||||
|
makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
|
||||||
|
gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
|
||||||
|
gnuweb-dir = www/server/standards
|
||||||
|
|
||||||
|
# Get the GNU make web page boilerplate etc.
|
||||||
|
update-makeweb:
|
||||||
|
[ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)'
|
||||||
|
[ -d '$(MAKEWEBDIR)'/CVS ] \
|
||||||
|
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|
||||||
|
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
|
||||||
|
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
|
||||||
|
|
||||||
|
# Get the GNU web page boilerplate etc.
|
||||||
|
update-gnuweb:
|
||||||
|
[ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)'
|
||||||
|
[ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \
|
||||||
|
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|
||||||
|
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
|
||||||
|
|
||||||
|
gendocs: update-gnuweb update-makeweb
|
||||||
|
cp $(GNULIBDIR)/doc/gendocs_template doc
|
||||||
|
cd doc \
|
||||||
|
&& rm -rf doc/manual \
|
||||||
|
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
|
||||||
|
make 'GNU Make Manual'
|
||||||
|
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
|
||||||
|
cp -r doc/manual '$(MAKEWEBDIR)'
|
||||||
|
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
|
||||||
|
&& cvs -q -n update | grep -v '^M ' \
|
||||||
|
&& echo '- cvs add <new files>' \
|
||||||
|
&& echo '- cvs remove <deleted files>' \
|
||||||
|
&& echo '- cvs commit' \
|
||||||
|
&& echo '- cvs tag make-$(subst .,-,$(VERSION))'
|
||||||
|
|
||||||
|
## ------------------------- ##
|
||||||
|
## Make release targets. ##
|
||||||
|
## ------------------------- ##
|
||||||
|
|
||||||
|
.PHONY: tag-release
|
||||||
|
tag-release:
|
||||||
|
case '$(VERSION)' in \
|
||||||
|
(*.*.9*) message=" candidate" ;; \
|
||||||
|
(*) message= ;; \
|
||||||
|
esac; \
|
||||||
|
$(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_FINGERPRINT)' '$(VERSION)'
|
||||||
|
|
||||||
## ------------------------- ##
|
## ------------------------- ##
|
||||||
## GNU FTP upload artifacts. ##
|
## GNU FTP upload artifacts. ##
|
||||||
## ------------------------- ##
|
## ------------------------- ##
|
||||||
@@ -229,7 +352,7 @@ po-check:
|
|||||||
# you're SOL! :)
|
# you're SOL! :)
|
||||||
|
|
||||||
GPG = gpg
|
GPG = gpg
|
||||||
GPGFLAGS = -u 6338B6D4
|
GPGFLAGS = -u $(GPG_FINGERPRINT)
|
||||||
|
|
||||||
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
|
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
|
||||||
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
|
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
|
||||||
@@ -266,8 +389,10 @@ $(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
|||||||
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
|
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
|
||||||
|
|
||||||
|
|
||||||
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
# Rebuild Makefile.in if this file is modifed.
|
||||||
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
Makefile.in: maintMakefile
|
||||||
|
|
||||||
|
# Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
|||||||
204
make.1
204
make.1
@@ -1,49 +1,35 @@
|
|||||||
.TH MAKE 1 "22 August 1989" "GNU" "LOCAL USER COMMANDS"
|
.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
make \- GNU make utility to maintain groups of programs
|
make \- GNU make utility to maintain groups of programs
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B "make "
|
.B make
|
||||||
[
|
[\fIOPTION\fR]... [\fITARGET\fR]...
|
||||||
.B \-f
|
|
||||||
.I makefile
|
|
||||||
] [ options ] ... [ targets ] ...
|
|
||||||
.SH WARNING
|
|
||||||
This man page is an extract of the documentation of GNU
|
|
||||||
.IR make .
|
|
||||||
It is updated only occasionally, because the GNU project does not use nroff.
|
|
||||||
For complete, current documentation, refer to the Info file
|
|
||||||
.B make.info
|
|
||||||
which is made from the Texinfo source file
|
|
||||||
.BR make.texi .
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.LP
|
.LP
|
||||||
The purpose of the
|
The
|
||||||
.I make
|
.I make
|
||||||
utility is to determine automatically which
|
utility will determine automatically which pieces of a large program need to
|
||||||
pieces of a large program need to be recompiled, and issue the commands to
|
be recompiled, and issue the commands to recompile them. The manual describes
|
||||||
recompile them.
|
the GNU implementation of
|
||||||
The manual describes the GNU implementation of
|
.BR make ,
|
||||||
.IR make ,
|
which was written by Richard Stallman and Roland McGrath, and is currently
|
||||||
which was written by Richard Stallman and Roland McGrath, and is
|
maintained by Paul Smith. Our examples show C programs, since they are very
|
||||||
currently maintained by Paul Smith.
|
common, but you can use
|
||||||
Our examples show C programs, since they are most common, but you can use
|
.B make
|
||||||
.I make
|
with any programming language whose compiler can be run with a shell command.
|
||||||
with any programming language whose compiler can be run with a
|
|
||||||
shell command.
|
|
||||||
In fact,
|
In fact,
|
||||||
.I make
|
.B make
|
||||||
is not limited to programs.
|
is not limited to programs. You can use it to describe any task where some
|
||||||
You can use it to describe any task where some files must be
|
files must be updated automatically from others whenever the others change.
|
||||||
updated automatically from others whenever the others change.
|
|
||||||
.LP
|
.LP
|
||||||
To prepare to use
|
To prepare to use
|
||||||
.IR make ,
|
.BR make ,
|
||||||
you must write a file called the
|
you must write a file called the
|
||||||
.I makefile
|
.I makefile
|
||||||
that describes the relationships among files in your program, and the
|
that describes the relationships among files in your program, and the states
|
||||||
states the commands for updating each file.
|
the commands for updating each file. In a program, typically the executable
|
||||||
In a program, typically the executable file is updated from object
|
file is updated from object files, which are in turn made by compiling source
|
||||||
files, which are in turn made by compiling source files.
|
files.
|
||||||
.LP
|
.LP
|
||||||
Once a suitable makefile exists, each time you change some source files,
|
Once a suitable makefile exists, each time you change some source files,
|
||||||
this simple shell command:
|
this simple shell command:
|
||||||
@@ -54,16 +40,15 @@ this simple shell command:
|
|||||||
.sp 1
|
.sp 1
|
||||||
suffices to perform all necessary recompilations.
|
suffices to perform all necessary recompilations.
|
||||||
The
|
The
|
||||||
.I make
|
.B make
|
||||||
program uses the makefile data base and the last-modification times
|
program uses the makefile description and the last-modification times of the
|
||||||
of the files to decide which of the files need to be updated.
|
files to decide which of the files need to be updated. For each of those
|
||||||
For each of those files, it issues the commands recorded in the data base.
|
files, it issues the commands recorded in the makefile.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
executes commands in the
|
executes commands in the
|
||||||
.I makefile
|
.I makefile
|
||||||
to update
|
to update one or more target
|
||||||
one or more target
|
|
||||||
.IR names ,
|
.IR names ,
|
||||||
where
|
where
|
||||||
.I name
|
.I name
|
||||||
@@ -71,7 +56,7 @@ is typically a program.
|
|||||||
If no
|
If no
|
||||||
.B \-f
|
.B \-f
|
||||||
option is present,
|
option is present,
|
||||||
.I make
|
.B make
|
||||||
will look for the makefiles
|
will look for the makefiles
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
.IR makefile ,
|
.IR makefile ,
|
||||||
@@ -90,27 +75,27 @@ listing, right near other important files such as
|
|||||||
.IR README .)
|
.IR README .)
|
||||||
The first name checked,
|
The first name checked,
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
is not recommended for most makefiles.
|
is not recommended for most makefiles. You should use this name if you have a
|
||||||
You should use this name if you have a makefile that is specific to GNU
|
makefile that is specific to GNU
|
||||||
.IR make ,
|
.BR make ,
|
||||||
and will not be understood by other versions of
|
and will not be understood by other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
If
|
If
|
||||||
.I makefile
|
.I makefile
|
||||||
is `\-', the standard input is read.
|
is '\-', the standard input is read.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
updates a target if it depends on prerequisite files
|
updates a target if it depends on prerequisite files
|
||||||
that have been modified since the target was last modified,
|
that have been modified since the target was last modified,
|
||||||
or if the target does not exist.
|
or if the target does not exist.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.sp 1
|
.sp 1
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-b , " \-m"
|
\fB\-b\fR, \fB\-m\fR
|
||||||
These options are ignored for compatibility with other versions of
|
These options are ignored for compatibility with other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-B , " \-\-always\-make"
|
\fB\-B\fR, \fB\-\-always\-make\fR
|
||||||
Unconditionally make all targets.
|
Unconditionally make all targets.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
||||||
@@ -126,7 +111,7 @@ previous one:
|
|||||||
is equivalent to
|
is equivalent to
|
||||||
.BR "\-C " /etc.
|
.BR "\-C " /etc.
|
||||||
This is typically used with recursive invocations of
|
This is typically used with recursive invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-d
|
.B \-d
|
||||||
Print debugging information in addition to normal processing.
|
Print debugging information in addition to normal processing.
|
||||||
@@ -134,7 +119,7 @@ The debugging information says which files are being considered for
|
|||||||
remaking, which file-times are being compared and with what results,
|
remaking, which file-times are being compared and with what results,
|
||||||
which files actually need to be remade, which implicit rules are
|
which files actually need to be remade, which implicit rules are
|
||||||
considered and which are applied---everything interesting about how
|
considered and which are applied---everything interesting about how
|
||||||
.I make
|
.B make
|
||||||
decides what to do.
|
decides what to do.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI \-\-debug "[=FLAGS]"
|
.BI \-\-debug "[=FLAGS]"
|
||||||
@@ -158,9 +143,11 @@ for showing implicit rules,
|
|||||||
.I j
|
.I j
|
||||||
for details on invocation of commands, and
|
for details on invocation of commands, and
|
||||||
.I m
|
.I m
|
||||||
for debugging while remaking makefiles.
|
for debugging while remaking makefiles. Use
|
||||||
|
.I n
|
||||||
|
to disable all previous debugging flags.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-e , " \-\-environment\-overrides"
|
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||||
Give variables taken from the environment precedence
|
Give variables taken from the environment precedence
|
||||||
over variables from makefiles.
|
over variables from makefiles.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
@@ -169,7 +156,7 @@ Use
|
|||||||
.I file
|
.I file
|
||||||
as a makefile.
|
as a makefile.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-i , " \-\-ignore\-errors"
|
\fB\-i\fR, \fB\-\-ignore\-errors\fR
|
||||||
Ignore all errors in commands executed to remake files.
|
Ignore all errors in commands executed to remake files.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
||||||
@@ -181,13 +168,14 @@ If several
|
|||||||
options are used to specify several directories, the directories are
|
options are used to specify several directories, the directories are
|
||||||
searched in the order specified.
|
searched in the order specified.
|
||||||
Unlike the arguments to other flags of
|
Unlike the arguments to other flags of
|
||||||
.IR make ,
|
.BR make ,
|
||||||
directories given with
|
directories given with
|
||||||
.B \-I
|
.B \-I
|
||||||
flags may come directly after the flag:
|
flags may come directly after the flag:
|
||||||
.BI \-I dir
|
.BI \-I dir
|
||||||
is allowed, as well as
|
is allowed, as well as
|
||||||
.BI "\-I " dir.
|
.B \-I
|
||||||
|
.IR dir .
|
||||||
This syntax is allowed for compatibility with the C
|
This syntax is allowed for compatibility with the C
|
||||||
preprocessor's
|
preprocessor's
|
||||||
.B \-I
|
.B \-I
|
||||||
@@ -203,10 +191,10 @@ option, the last one is effective.
|
|||||||
If the
|
If the
|
||||||
.B \-j
|
.B \-j
|
||||||
option is given without an argument,
|
option is given without an argument,
|
||||||
.IR make
|
.BR make
|
||||||
will not limit the number of jobs that can run simultaneously.
|
will not limit the number of jobs that can run simultaneously.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-k , " \-\-keep\-going"
|
\fB\-k\fR, \fB\-\-keep\-going\fR
|
||||||
Continue as much as possible after an error.
|
Continue as much as possible after an error.
|
||||||
While the target that failed, and those that depend on it, cannot
|
While the target that failed, and those that depend on it, cannot
|
||||||
be remade, the other dependencies of these targets can be processed
|
be remade, the other dependencies of these targets can be processed
|
||||||
@@ -219,10 +207,10 @@ others jobs running and the load average is at least
|
|||||||
(a floating-point number).
|
(a floating-point number).
|
||||||
With no argument, removes a previous load limit.
|
With no argument, removes a previous load limit.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-L , " \-\-check\-symlink\-times"
|
\fB\-L\fR, \fB\-\-check\-symlink\-times\fR
|
||||||
Use the latest mtime between symlinks and target.
|
Use the latest mtime between symlinks and target.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-n , " \-\-just\-print" , " \-\-dry\-run" , " \-\-recon"
|
\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
|
Print the commands that would be executed, but do not execute them (except in
|
||||||
certain circumstances).
|
certain circumstances).
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
@@ -234,7 +222,29 @@ on account of changes in
|
|||||||
.IR file .
|
.IR file .
|
||||||
Essentially the file is treated as very old and its rules are ignored.
|
Essentially the file is treated as very old and its rules are ignored.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-p , " \-\-print\-data\-base"
|
\fB\-O\fR[\fItype\fR], \fB\-\-output\-sync\fR[=\fItype\fR]
|
||||||
|
When running multiple jobs in parallel with \fB-j\fR, ensure the output of
|
||||||
|
each job is collected together rather than interspersed with output from
|
||||||
|
other jobs. If
|
||||||
|
.I type
|
||||||
|
is not specified or is
|
||||||
|
.B target
|
||||||
|
the output from the entire recipe for each target is grouped together. If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B line
|
||||||
|
the output from each command line within a recipe is grouped together.
|
||||||
|
If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B recurse
|
||||||
|
output from an entire recursive make is grouped together. If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B none
|
||||||
|
output synchronization is disabled.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-p\fR, \fB\-\-print\-data\-base\fR
|
||||||
Print the data base (rules and variable values) that results from
|
Print the data base (rules and variable values) that results from
|
||||||
reading the makefiles; then execute as usual or as otherwise
|
reading the makefiles; then execute as usual or as otherwise
|
||||||
specified.
|
specified.
|
||||||
@@ -242,59 +252,61 @@ This also prints the version information given by the
|
|||||||
.B \-v
|
.B \-v
|
||||||
switch (see below).
|
switch (see below).
|
||||||
To print the data base without trying to remake any files, use
|
To print the data base without trying to remake any files, use
|
||||||
.B make
|
.IR "make \-p \-f/dev/null" .
|
||||||
.B \-p
|
|
||||||
.BI \-f /dev/null.
|
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-q , " \-\-question"
|
\fB\-q\fR, \fB\-\-question\fR
|
||||||
``Question mode''.
|
``Question mode''.
|
||||||
Do not run any commands, or print anything; just return an exit status
|
Do not run any commands, or print anything; just return an exit status
|
||||||
that is zero if the specified targets are already up to date, nonzero
|
that is zero if the specified targets are already up to date, nonzero
|
||||||
otherwise.
|
otherwise.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-r , " \-\-no\-builtin\-rules"
|
\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR
|
||||||
Eliminate use of the built\-in implicit rules.
|
Eliminate use of the built\-in implicit rules.
|
||||||
Also clear out the default list of suffixes for suffix rules.
|
Also clear out the default list of suffixes for suffix rules.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-R , " \-\-no\-builtin\-variables"
|
\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR
|
||||||
Don't define any built\-in variables.
|
Don't define any built\-in variables.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-s , " \-\-silent" , " \-\-quiet"
|
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||||
Silent operation; do not print the commands as they are executed.
|
Silent operation; do not print the commands as they are executed.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-S , " \-\-no\-keep\-going" , " \-\-stop"
|
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||||
Cancel the effect of the
|
Cancel the effect of the
|
||||||
.B \-k
|
.B \-k
|
||||||
option.
|
option.
|
||||||
This is never necessary except in a recursive
|
This is never necessary except in a recursive
|
||||||
.I make
|
.B make
|
||||||
where
|
where
|
||||||
.B \-k
|
.B \-k
|
||||||
might be inherited from the top-level
|
might be inherited from the top-level
|
||||||
.I make
|
.B make
|
||||||
via MAKEFLAGS or if you set
|
via MAKEFLAGS or if you set
|
||||||
.B \-k
|
.B \-k
|
||||||
in MAKEFLAGS in your environment.
|
in MAKEFLAGS in your environment.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-t , " \-\-touch"
|
\fB\-t\fR, \fB\-\-touch\fR
|
||||||
Touch files (mark them up to date without really changing them)
|
Touch files (mark them up to date without really changing them)
|
||||||
instead of running their commands.
|
instead of running their commands.
|
||||||
This is used to pretend that the commands were done, in order to fool
|
This is used to pretend that the commands were done, in order to fool
|
||||||
future invocations of
|
future invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-v , " \-\-version"
|
.B \-\-trace
|
||||||
|
Information about the disposition of each target is printed (why the target is
|
||||||
|
being rebuilt and what commands are run to rebuild it).
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
Print the version of the
|
Print the version of the
|
||||||
.I make
|
.B make
|
||||||
program plus a copyright, a list of authors and a notice that there
|
program plus a copyright, a list of authors and a notice that there
|
||||||
is no warranty.
|
is no warranty.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BR \-w , " \-\-print\-directory"
|
\fB\-w\fR, \fB\-\-print\-directory\fR
|
||||||
Print a message containing the working directory
|
Print a message containing the working directory
|
||||||
before and after other processing.
|
before and after other processing.
|
||||||
This may be useful for tracking down errors from complicated nests of
|
This may be useful for tracking down errors from complicated nests of
|
||||||
recursive
|
recursive
|
||||||
.I make
|
.B make
|
||||||
commands.
|
commands.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-\-no\-print\-directory
|
.B \-\-no\-print\-directory
|
||||||
@@ -314,36 +326,46 @@ Without
|
|||||||
it is almost the same as running a
|
it is almost the same as running a
|
||||||
.I touch
|
.I touch
|
||||||
command on the given file before running
|
command on the given file before running
|
||||||
.IR make ,
|
.BR make ,
|
||||||
except that the modification time is changed only in the imagination of
|
except that the modification time is changed only in the imagination of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-\-warn\-undefined\-variables
|
.B \-\-warn\-undefined\-variables
|
||||||
Warn when an undefined variable is referenced.
|
Warn when an undefined variable is referenced.
|
||||||
.SH "EXIT STATUS"
|
.SH "EXIT STATUS"
|
||||||
GNU
|
GNU
|
||||||
.I make
|
.B make
|
||||||
exits with a status of zero if all makefiles were successfully parsed
|
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
|
and no targets that were built failed. A status of one will be returned
|
||||||
if the
|
if the
|
||||||
.B \-q
|
.B \-q
|
||||||
flag was used and
|
flag was used and
|
||||||
.I make
|
.B make
|
||||||
determines that a target needs to be rebuilt. A status of two will be
|
determines that a target needs to be rebuilt. A status of two will be
|
||||||
returned if any errors were encountered.
|
returned if any errors were encountered.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.I "The GNU Make Manual"
|
The full documentation for
|
||||||
|
.B make
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B make
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info make
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
See the chapter `Problems and Bugs' in
|
See the chapter ``Problems and Bugs'' in
|
||||||
.IR "The GNU Make Manual" .
|
.IR "The GNU Make Manual" .
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
This manual page contributed by Dennis Morse of Stanford University.
|
This manual page contributed by Dennis Morse of Stanford University.
|
||||||
It has been reworked by Roland McGrath. Further updates contributed by
|
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||||
Mike Frysinger.
|
McGrath. Maintained by Paul Smith.
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
Copyright (C) 1992, 1993, 1996, 1999, 2007 Free Software Foundation, Inc.
|
Copyright \(co 1992-1993, 1996-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU
|
This file is part of
|
||||||
.IR make .
|
.IR "GNU make" .
|
||||||
.LP
|
.LP
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
|||||||
2
make.lnk
2
make.lnk
@@ -1,4 +1,4 @@
|
|||||||
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"
|
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"+"output.o"
|
||||||
TO "make.new"
|
TO "make.new"
|
||||||
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
||||||
QUIET
|
QUIET
|
||||||
|
|||||||
@@ -154,6 +154,11 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\getopt1.c">
|
RelativePath=".\getopt1.c">
|
||||||
</File>
|
</File>
|
||||||
|
|
||||||
|
<File
|
||||||
|
RelativePath=".\guile.c">
|
||||||
|
</File>
|
||||||
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\hash.c">
|
RelativePath=".\hash.c">
|
||||||
</File>
|
</File>
|
||||||
@@ -166,6 +171,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\job.c">
|
RelativePath=".\job.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\load.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\output.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\main.c">
|
RelativePath=".\main.c">
|
||||||
</File>
|
</File>
|
||||||
@@ -202,6 +213,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\w32\compat\dirent.c">
|
RelativePath=".\w32\compat\dirent.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\compat\posixfcn.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\w32\subproc\misc.c">
|
RelativePath=".\w32\subproc\misc.c">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@@ -220,6 +234,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\w32\pathstuff.c">
|
RelativePath=".\w32\pathstuff.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\w32os.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\w32\subproc\sub_proc.c">
|
RelativePath=".\w32\subproc\sub_proc.c">
|
||||||
</File>
|
</File>
|
||||||
@@ -263,6 +280,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\gettext.h">
|
RelativePath=".\gettext.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gmk-default.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\hash.h">
|
RelativePath=".\hash.h">
|
||||||
</File>
|
</File>
|
||||||
@@ -270,7 +290,10 @@
|
|||||||
RelativePath=".\job.h">
|
RelativePath=".\job.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\make.h">
|
RelativePath=".\output.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\makeint.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\rule.h">
|
RelativePath=".\rule.h">
|
||||||
|
|||||||
44
makefile.com
44
makefile.com
@@ -1,8 +1,7 @@
|
|||||||
$!
|
$!
|
||||||
$! Makefile.com - builds GNU Make for VMS
|
$! Makefile.com - builds GNU Make for VMS
|
||||||
$!
|
$!
|
||||||
$! P1 is non-empty if you want to link with the VAXCRTL library instead
|
$! P1 = LIST will provide compiler listings.
|
||||||
$! of the shareable executable
|
|
||||||
$! P2 = DEBUG will build an image with debug information
|
$! P2 = DEBUG will build an image with debug information
|
||||||
$! P3 = WALL will enable all warning messages (some are suppressed since
|
$! P3 = WALL will enable all warning messages (some are suppressed since
|
||||||
$! one macro intentionally causes an error condition)
|
$! one macro intentionally causes an error condition)
|
||||||
@@ -50,6 +49,12 @@ $ endif
|
|||||||
$ endif
|
$ endif
|
||||||
$ endif
|
$ endif
|
||||||
$!
|
$!
|
||||||
|
$!
|
||||||
|
$ if (p1 .eqs. "LIST")
|
||||||
|
$ then
|
||||||
|
$ ccopt = ccopt + "/list/show=(expan,inclu)"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
$! Should we build a debug image
|
$! Should we build a debug image
|
||||||
$!
|
$!
|
||||||
$ if (p2.eqs."DEBUG")
|
$ if (p2.eqs."DEBUG")
|
||||||
@@ -67,9 +72,12 @@ $ then
|
|||||||
$ gosub check_cc_qual
|
$ gosub check_cc_qual
|
||||||
$ endif
|
$ endif
|
||||||
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
||||||
"hash implicit job main misc read remake remote-stub rule " + -
|
"guile hash implicit job load main misc read remake " + -
|
||||||
"signame variable version vmsfunctions vmsify vpath " + -
|
"remote-stub rule output signame variable version " + -
|
||||||
"[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
|
"vmsfunctions vmsify vpath vms_progname vms_exit " + -
|
||||||
|
"vms_export_symbol [.glob]glob [.glob]fnmatch getopt1 " + -
|
||||||
|
"getopt strcache"
|
||||||
|
$!
|
||||||
$ copy config.h-vms config.h
|
$ copy config.h-vms config.h
|
||||||
$ n=0
|
$ n=0
|
||||||
$ open/write optf make.opt
|
$ open/write optf make.opt
|
||||||
@@ -77,18 +85,14 @@ $ loop:
|
|||||||
$ cfile = f$elem(n," ",filelist)
|
$ cfile = f$elem(n," ",filelist)
|
||||||
$ if cfile .eqs. " " then goto linkit
|
$ if cfile .eqs. " " then goto linkit
|
||||||
$ write sys$output "Compiling ''cfile'..."
|
$ write sys$output "Compiling ''cfile'..."
|
||||||
$ call compileit 'cfile' 'p1'
|
$ call compileit 'cfile'
|
||||||
$ n = n + 1
|
$ n = n + 1
|
||||||
$ goto loop
|
$ goto loop
|
||||||
$ linkit:
|
$ linkit:
|
||||||
$ close optf
|
$ close optf
|
||||||
$ if p1 .nes. "" then goto link_using_library
|
|
||||||
$ link/exe=make make.opt/opt'lopt
|
$ link/exe=make make.opt/opt'lopt
|
||||||
$ goto cleanup
|
$ goto cleanup
|
||||||
$
|
$
|
||||||
$ link_using_library:
|
|
||||||
$ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt
|
|
||||||
$
|
|
||||||
$ cleanup:
|
$ cleanup:
|
||||||
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
||||||
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
||||||
@@ -128,18 +132,24 @@ $!-----------------------------------------------------------------------------
|
|||||||
$!
|
$!
|
||||||
$ compileit : subroutine
|
$ compileit : subroutine
|
||||||
$ ploc = f$locate("]",p1)
|
$ ploc = f$locate("]",p1)
|
||||||
$ filnam = p1
|
$! filnam = p1
|
||||||
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
|
$ if ploc .lt. f$length(p1)
|
||||||
$ write optf "''filnam'"
|
$ then
|
||||||
$ cc'ccopt'/include=([],[.glob]) -
|
$ objdir = f$extract(0, ploc+1, p1)
|
||||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
|
$ write optf p1
|
||||||
|
$ else
|
||||||
|
$ objdir := []
|
||||||
|
$ write optf objdir+p1
|
||||||
|
$ endif
|
||||||
|
$ cc'ccopt'/nested=none/include=([],[.glob])/obj='objdir' -
|
||||||
|
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file",-
|
||||||
|
"unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||||
'p1'
|
'p1'
|
||||||
$ exit
|
$ exit
|
||||||
$ endsubroutine : compileit
|
$ endsubroutine : compileit
|
||||||
$!
|
$!
|
||||||
$!-----------------------------------------------------------------------------
|
$!-----------------------------------------------------------------------------
|
||||||
$!Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
$!Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
$!2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
$!This file is part of GNU Make.
|
$!This file is part of GNU Make.
|
||||||
$!
|
$!
|
||||||
$!GNU Make is free software; you can redistribute it and/or modify it under
|
$!GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
|||||||
115
makefile.vms
115
makefile.vms
@@ -1,7 +1,6 @@
|
|||||||
# -*-Makefile-*- to build GNU make on VMS
|
# -*-Makefile-*- to build GNU make on VMS
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -21,7 +20,7 @@
|
|||||||
# Klaus Kämpf (kkaempf@rmi.de)
|
# Klaus Kämpf (kkaempf@rmi.de)
|
||||||
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
||||||
# Modified for version 3.80 by zinser@decus.de
|
# Modified for version 3.80 by zinser@decus.de
|
||||||
# Modified for version 3.81 by Hartmut Becker
|
# Modified for versions 3.81, 3.99.90 by Hartmut Becker
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
CP = copy
|
CP = copy
|
||||||
@@ -33,9 +32,12 @@ CP = copy
|
|||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(CC),cc)
|
ifeq ($(CC),cc)
|
||||||
CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
|
cinclude = /nested=none/include=([],[.glob])
|
||||||
|
cprefix = /prefix=(all,except=(glob,globfree))
|
||||||
|
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
||||||
|
CFLAGS = $(defines) $(cinclude)$(cprefix)$(cwarn)
|
||||||
else
|
else
|
||||||
CFLAGS = $(defines) /include=([],[.glob])
|
CFLAGS = $(defines) $(cinclude)
|
||||||
endif
|
endif
|
||||||
#LDFLAGS = /deb
|
#LDFLAGS = /deb
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
@@ -82,22 +84,27 @@ extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
|||||||
# as an alternative:
|
# as an alternative:
|
||||||
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
||||||
getopt = ,getopt.obj,getopt1.obj
|
getopt = ,getopt.obj,getopt1.obj
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = []
|
bindir = []
|
||||||
# Directory to install the man page in.
|
# Directory to install the man page in.
|
||||||
mandir = []
|
mandir = []
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
|
|
||||||
objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
guile = ,guile.obj
|
||||||
main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
|
||||||
|
objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
||||||
|
load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
||||||
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
||||||
vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
|
vpath.obj,version.obj,vms_progname.obj,vms_exit.obj,\
|
||||||
srcs = commands.c job.c dir.c file.c misc.c hash.c \
|
vms_export_symbol.obj$(guile)$(ARCHIVES)$(extras)$(getopt)$(glob)
|
||||||
main.c read.c remake.c rule.c implicit.c \
|
|
||||||
|
srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
||||||
|
load.c main.c read.c remake.c rule.c implicit.c \
|
||||||
default.c variable.c expand.c function.c strcache.c \
|
default.c variable.c expand.c function.c strcache.c \
|
||||||
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
vpath.c version.c vmsfunctions.c vmsify.c vms_progname.c vms_exit.c \
|
||||||
commands.h dep.h filedef.h job.h make.h rule.h variable.h
|
vms_export_symbol.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
||||||
|
commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all doc
|
.PHONY: all doc
|
||||||
@@ -111,39 +118,63 @@ make.exe: $(objs)
|
|||||||
|
|
||||||
.PHONY: clean realclean
|
.PHONY: clean realclean
|
||||||
clean:
|
clean:
|
||||||
$$ purge [...]
|
-purge [...]
|
||||||
-$(RM) make.exe;,*.obj;
|
-$(RM) make.exe;,*.obj;
|
||||||
-$(RM) [.glob]*.obj;
|
-$(RM) [.glob]*.obj;
|
||||||
|
|
||||||
# Automatically generated dependencies.
|
ar.obj: ar.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h dep.h \
|
||||||
commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h
|
[.glob]fnmatch.h
|
||||||
job.obj: job.c vmsjobs.c make.h commands.h job.h filedef.h variable.h
|
arscan.obj: arscan.c makeint.h config.h gnumake.h gettext.h
|
||||||
dir.obj: dir.c make.h
|
commands.obj: commands.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
file.obj: file.c make.h commands.h dep.h filedef.h variable.h
|
hash.h dep.h variable.h job.h output.h commands.h
|
||||||
misc.obj: misc.c make.h dep.h
|
default.obj: default.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
hash.obj: hash.c make.h hash.h
|
hash.h variable.h rule.h dep.h job.h output.h commands.h
|
||||||
strcache.obj: strcache.c make.h hash.h
|
dir.obj: dir.c makeint.h config.h gnumake.h gettext.h hash.h filedef.h \
|
||||||
main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h
|
dep.h [.glob]glob.h
|
||||||
read.obj: read.c make.h commands.h dep.h filedef.h variable.h
|
expand.obj: expand.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
remake.obj: remake.c make.h commands.h job.h dep.h filedef.h
|
hash.h job.h output.h commands.h variable.h rule.h
|
||||||
rule.obj: rule.c make.h commands.h dep.h filedef.h variable.h rule.h
|
file.obj: file.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
implicit.obj: implicit.c make.h rule.h dep.h filedef.h
|
dep.h job.h output.h commands.h variable.h debug.h
|
||||||
default.obj: default.c make.h rule.h dep.h filedef.h commands.h variable.h
|
[.glob]fnmatch.obj: [.glob]fnmatch.c config.h [.glob]fnmatch.h
|
||||||
variable.obj: variable.c make.h commands.h variable.h dep.h filedef.h
|
function.obj: function.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
expand.obj: expand.c make.h commands.h filedef.h variable.h
|
hash.h variable.h dep.h job.h output.h commands.h debug.h
|
||||||
function.obj: function.c make.h variable.h dep.h commands.h job.h
|
getopt.obj: getopt.c config.h gettext.h getopt.h
|
||||||
vpath.obj: vpath.c make.h filedef.h variable.h
|
getopt1.obj: getopt1.c config.h getopt.h
|
||||||
|
[.glob]glob.obj: [.glob]glob.c config.h [.glob]fnmatch.h [.glob]glob.h
|
||||||
|
guile.obj: guile.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
hash.obj: hash.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||||
|
implicit.obj: implicit.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h rule.h dep.h debug.h variable.h job.h output.h commands.h
|
||||||
|
job.obj: job.c makeint.h config.h gnumake.h gettext.h job.h output.h debug.h \
|
||||||
|
filedef.h hash.h commands.h variable.h debug.h vmsjobs.c
|
||||||
|
load.obj: load.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
main.obj: main.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h variable.h job.h output.h commands.h rule.h debug.h getopt.h
|
||||||
|
misc.obj: misc.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h debug.h
|
||||||
|
output.obj: output.c makeint.h config.h gnumake.h gettext.h job.h output.h
|
||||||
|
read.obj: read.c makeint.h config.h gnumake.h gettext.h [.glob]glob.h \
|
||||||
|
filedef.h hash.h dep.h job.h output.h commands.h variable.h rule.h \
|
||||||
|
debug.h
|
||||||
|
remake.obj: remake.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h job.h output.h commands.h dep.h variable.h debug.h
|
||||||
|
remote-stub.obj: remote-stub.c makeint.h config.h gnumake.h gettext.h \
|
||||||
|
filedef.h hash.h job.h output.h commands.h
|
||||||
|
rule.obj: rule.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h job.h output.h commands.h variable.h rule.h
|
||||||
|
signame.obj: signame.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
strcache.obj: strcache.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||||
|
variable.obj: variable.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h dep.h job.h output.h commands.h variable.h rule.h
|
||||||
version.obj: version.c config.h
|
version.obj: version.c config.h
|
||||||
arscan.obj: arscan.c
|
vmsfunctions.obj: vmsfunctions.c makeint.h config.h gnumake.h gettext.h \
|
||||||
ar.obj: ar.c make.h filedef.h
|
debug.h job.h output.h vmsdir.h
|
||||||
signame.obj: signame.c
|
vmsify.obj: vmsify.c
|
||||||
remote-stub.obj: remote-stub.c
|
vpath.obj: vpath.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
[.glob]glob.obj: [.glob]glob.c
|
variable.h
|
||||||
[.glob]fnmatch.obj: [.glob]fnmatch.c
|
vms_progname.obj: vms_progname.c
|
||||||
getopt.obj: getopt.c
|
vms_exit.obj: vms_exit.c
|
||||||
getopt1.obj: getopt1.c
|
vms_export_symbol.obj: vms_export_symbol.c
|
||||||
vmsfunctions.obj: vmsfunctions.c make.h vmsdir.h
|
|
||||||
vmsify.obj: vmsify.c make.h
|
|
||||||
|
|
||||||
config.h: config.h-vms
|
config.h: config.h-vms
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -18,7 +16,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
/* We use <config.h> instead of "config.h" so that a compilation
|
/* We use <config.h> instead of "config.h" so that a compilation
|
||||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||||
(which it would do because make.h was found in $srcdir). */
|
(which it would do because makeint.h was found in $srcdir). */
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#undef HAVE_CONFIG_H
|
#undef HAVE_CONFIG_H
|
||||||
#define HAVE_CONFIG_H 1
|
#define HAVE_CONFIG_H 1
|
||||||
@@ -43,6 +41,20 @@ char *alloca ();
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Disable assert() unless we're a maintainer.
|
||||||
|
Some asserts are compute-intensive. */
|
||||||
|
#ifndef MAKE_MAINTAINER_MODE
|
||||||
|
# define NDEBUG 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Include the externally-visible content.
|
||||||
|
Be sure to use the local one, and not one installed on the system.
|
||||||
|
Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
|
||||||
|
declarations for MS-Windows. */
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
# define GMK_BUILDING_MAKE
|
||||||
|
#endif
|
||||||
|
#include "gnumake.h"
|
||||||
|
|
||||||
#ifdef CRAY
|
#ifdef CRAY
|
||||||
/* This must happen before #include <signal.h> so
|
/* This must happen before #include <signal.h> so
|
||||||
@@ -60,13 +72,12 @@ char *alloca ();
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIMEB_H
|
#ifdef HAVE_SYS_TIMEB_H
|
||||||
/* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in <time.h> that bombs
|
/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
|
||||||
unless <sys/timeb.h> has been included first. Does every system have a
|
unless <sys/timeb.h> has been included first. */
|
||||||
<sys/timeb.h>? If any does not, configure should check for it. */
|
|
||||||
# include <sys/timeb.h>
|
# include <sys/timeb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TIME_WITH_SYS_TIME
|
#if TIME_WITH_SYS_TIME
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
@@ -84,14 +95,19 @@ char *alloca ();
|
|||||||
extern int errno;
|
extern int errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef isblank
|
#ifdef __VMS
|
||||||
# define isblank(c) ((c) == ' ' || (c) == '\t')
|
/* 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
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||||
POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */
|
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||||
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||||
# define POSIX 1
|
# define POSIX 1
|
||||||
# endif
|
# endif
|
||||||
@@ -118,6 +134,13 @@ extern int errno;
|
|||||||
# define SA_RESTART 0
|
# define SA_RESTART 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_VFORK_H
|
||||||
|
# include <vfork.h>
|
||||||
|
#endif
|
||||||
|
#if !HAVE_WORKING_VFORK
|
||||||
|
# define vfork fork
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -148,8 +171,13 @@ unsigned int get_path_max (void);
|
|||||||
# define CHAR_BIT 8
|
# define CHAR_BIT 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Nonzero if the integer type T is signed. */
|
#ifndef USHRT_MAX
|
||||||
#define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0)
|
# 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.
|
/* The minimum and maximum values for the integer type T.
|
||||||
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
||||||
@@ -178,12 +206,20 @@ unsigned int get_path_max (void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
# include <fcntl.h>
|
||||||
# include <types.h>
|
# include <types.h>
|
||||||
# include <unixlib.h>
|
# include <unixlib.h>
|
||||||
# include <unixio.h>
|
# include <unixio.h>
|
||||||
# include <perror.h>
|
# include <perror.h>
|
||||||
/* Needed to use alloca on VMS. */
|
/* Needed to use alloca on VMS. */
|
||||||
# include <builtins.h>
|
# 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
|
#endif
|
||||||
|
|
||||||
#ifndef __attribute__
|
#ifndef __attribute__
|
||||||
@@ -191,7 +227,7 @@ unsigned int get_path_max (void);
|
|||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||||
# define __attribute__(x)
|
# define __attribute__(x)
|
||||||
# endif
|
# endif
|
||||||
/* The __-protected variants of `format' and `printf' attributes
|
/* The __-protected variants of 'format' and 'printf' attributes
|
||||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||||
# define __format__ format
|
# define __format__ format
|
||||||
@@ -249,6 +285,9 @@ char *strerror (int errnum);
|
|||||||
#if HAVE_INTTYPES_H
|
#if HAVE_INTTYPES_H
|
||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_STDINT_H
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
#define FILE_TIMESTAMP uintmax_t
|
#define FILE_TIMESTAMP uintmax_t
|
||||||
|
|
||||||
#if !defined(HAVE_STRSIGNAL)
|
#if !defined(HAVE_STRSIGNAL)
|
||||||
@@ -262,7 +301,7 @@ char *strsignal (int signum);
|
|||||||
- It's typically faster.
|
- It's typically faster.
|
||||||
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
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
|
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
|
it's important to use the locale's definition of 'digit' even when the
|
||||||
host does not conform to POSIX. */
|
host does not conform to POSIX. */
|
||||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||||
|
|
||||||
@@ -305,17 +344,6 @@ char *strsignal (int signum);
|
|||||||
#define N_(msgid) gettext_noop (msgid)
|
#define N_(msgid) gettext_noop (msgid)
|
||||||
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
||||||
|
|
||||||
/* Handle other OSs. */
|
|
||||||
#ifndef PATH_SEPARATOR_CHAR
|
|
||||||
# if defined(HAVE_DOS_PATHS)
|
|
||||||
# define PATH_SEPARATOR_CHAR ';'
|
|
||||||
# elif defined(VMS)
|
|
||||||
# define PATH_SEPARATOR_CHAR ','
|
|
||||||
# else
|
|
||||||
# define PATH_SEPARATOR_CHAR ':'
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is needed for getcwd() and chdir(), on some W32 systems. */
|
/* This is needed for getcwd() and chdir(), on some W32 systems. */
|
||||||
#if defined(HAVE_DIRECT_H)
|
#if defined(HAVE_DIRECT_H)
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
@@ -326,10 +354,17 @@ char *strsignal (int signum);
|
|||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
||||||
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
||||||
|
/* 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);
|
void sync_Path_environment (void);
|
||||||
int w32_kill (pid_t pid, int sig);
|
int w32_kill (pid_t pid, int sig);
|
||||||
char *end_of_token_w32 (const char *s, char stopchar);
|
|
||||||
int find_and_set_default_shell (const char *token);
|
int find_and_set_default_shell (const char *token);
|
||||||
|
|
||||||
/* indicates whether or not we have Bourne shell */
|
/* indicates whether or not we have Bourne shell */
|
||||||
@@ -337,54 +372,131 @@ extern int no_default_sh_exe;
|
|||||||
|
|
||||||
/* is default_shell unixy? */
|
/* is default_shell unixy? */
|
||||||
extern int unixy_shell;
|
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 */
|
#endif /* WINDOWS32 */
|
||||||
|
|
||||||
|
#define ANY_SET(_v,_m) (((_v)&(_m)) != 0)
|
||||||
|
#define NONE_SET(_v,_m) (! ANY_SET ((_v),(_m)))
|
||||||
|
|
||||||
|
#define MAP_NUL 0x0001
|
||||||
|
#define MAP_BLANK 0x0002
|
||||||
|
#define MAP_NEWLINE 0x0004
|
||||||
|
#define MAP_COMMENT 0x0008
|
||||||
|
#define MAP_SEMI 0x0010
|
||||||
|
#define MAP_EQUALS 0x0020
|
||||||
|
#define MAP_COLON 0x0040
|
||||||
|
#define MAP_PERCENT 0x0080
|
||||||
|
#define MAP_PIPE 0x0100
|
||||||
|
#define MAP_DOT 0x0200
|
||||||
|
#define MAP_COMMA 0x0400
|
||||||
|
|
||||||
|
/* These are the valid characters for a user-defined function. */
|
||||||
|
#define MAP_USERFUNC 0x2000
|
||||||
|
/* This means not only a '$', but skip the variable reference. */
|
||||||
|
#define MAP_VARIABLE 0x4000
|
||||||
|
/* The set of characters which are directory separators is OS-specific. */
|
||||||
|
#define MAP_DIRSEP 0x8000
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
# define MAP_VMSCOMMA MAP_COMMA
|
||||||
|
#else
|
||||||
|
# define MAP_VMSCOMMA 0x0000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAP_SPACE (MAP_BLANK|MAP_NEWLINE)
|
||||||
|
|
||||||
|
/* Handle other OSs.
|
||||||
|
To overcome an issue parsing paths in a DOS/Windows environment when
|
||||||
|
built in a unix based environment, override the PATH_SEPARATOR_CHAR
|
||||||
|
definition unless being built for Cygwin. */
|
||||||
|
#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
|
||||||
|
# undef PATH_SEPARATOR_CHAR
|
||||||
|
# define PATH_SEPARATOR_CHAR ';'
|
||||||
|
# define MAP_PATHSEP MAP_SEMI
|
||||||
|
#elif !defined(PATH_SEPARATOR_CHAR)
|
||||||
|
# if defined (VMS)
|
||||||
|
# define PATH_SEPARATOR_CHAR (vms_comma_separator ? ',' : ':')
|
||||||
|
# define MAP_PATHSEP (vms_comma_separator ? MAP_COMMA : MAP_SEMI)
|
||||||
|
# else
|
||||||
|
# define PATH_SEPARATOR_CHAR ':'
|
||||||
|
# define MAP_PATHSEP MAP_COLON
|
||||||
|
# endif
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ':'
|
||||||
|
# define MAP_PATHSEP MAP_COLON
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ';'
|
||||||
|
# define MAP_PATHSEP MAP_SEMI
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ','
|
||||||
|
# define MAP_PATHSEP MAP_COMMA
|
||||||
|
#else
|
||||||
|
# error "Unknown PATH_SEPARATOR_CHAR"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STOP_SET(_v,_m) ANY_SET(stopchar_map[(unsigned char)(_v)],(_m))
|
||||||
|
|
||||||
|
#define ISBLANK(c) STOP_SET((c),MAP_BLANK)
|
||||||
|
#define ISSPACE(c) STOP_SET((c),MAP_SPACE)
|
||||||
|
#define NEXT_TOKEN(s) while (ISSPACE (*(s))) ++(s)
|
||||||
|
#define END_OF_TOKEN(s) while (! STOP_SET (*(s), MAP_SPACE|MAP_NUL)) ++(s)
|
||||||
|
|
||||||
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
|
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
|
||||||
# define SET_STACK_SIZE
|
# define SET_STACK_SIZE
|
||||||
#endif
|
#endif
|
||||||
#ifdef SET_STACK_SIZE
|
#ifdef SET_STACK_SIZE
|
||||||
# include <sys/resource.h>
|
# include <sys/resource.h>
|
||||||
struct rlimit stack_limit;
|
extern struct rlimit stack_limit;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct floc
|
#define NILF ((gmk_floc *)0)
|
||||||
{
|
|
||||||
const char *filenm;
|
|
||||||
unsigned long lineno;
|
|
||||||
};
|
|
||||||
#define NILF ((struct floc *)0)
|
|
||||||
|
|
||||||
#define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1)
|
#define CSTRLEN(_s) (sizeof (_s)-1)
|
||||||
|
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
|
||||||
|
|
||||||
|
/* The number of bytes needed to represent the largest integer as a string. */
|
||||||
|
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
|
||||||
|
|
||||||
|
#define DEFAULT_TTYNAME "true"
|
||||||
|
#ifdef HAVE_TTYNAME
|
||||||
|
# define TTYNAME(_f) ttyname (_f)
|
||||||
|
#else
|
||||||
|
# define TTYNAME(_f) DEFAULT_TTYNAME
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
|
|
||||||
variadic versions of these functions. */
|
|
||||||
|
|
||||||
#if HAVE_STDARG_H || HAVE_VARARGS_H
|
|
||||||
# if HAVE_VPRINTF || HAVE_DOPRNT
|
|
||||||
# define USE_VARIADIC 1
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
|
||||||
const char *concat (unsigned int, ...);
|
const char *concat (unsigned int, ...);
|
||||||
void message (int prefix, const char *fmt, ...)
|
void message (int prefix, size_t length, const char *fmt, ...)
|
||||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||||
void error (const struct floc *flocp, const char *fmt, ...)
|
void error (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||||
void fatal (const struct floc *flocp, const char *fmt, ...)
|
void fatal (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||||
__attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
|
__attribute__ ((noreturn, __format__ (__printf__, 3, 4)));
|
||||||
#else
|
|
||||||
const char *concat ();
|
#define O(_t,_a,_f) _t((_a), 0, (_f))
|
||||||
void message ();
|
#define OS(_t,_a,_f,_s) _t((_a), strlen (_s), (_f), (_s))
|
||||||
void error ();
|
#define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
|
||||||
void fatal ();
|
(_f), (_s1), (_s2))
|
||||||
#endif
|
#define OSSS(_t,_a,_f,_s1,_s2,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3), \
|
||||||
|
(_f), (_s1), (_s2), (_s3))
|
||||||
|
#define ON(_t,_a,_f,_n) _t((_a), INTSTR_LENGTH, (_f), (_n))
|
||||||
|
#define ONN(_t,_a,_f,_n1,_n2) _t((_a), INTSTR_LENGTH*2, (_f), (_n1), (_n2))
|
||||||
|
|
||||||
|
#define OSN(_t,_a,_f,_s,_n) _t((_a), strlen (_s) + INTSTR_LENGTH, \
|
||||||
|
(_f), (_s), (_n))
|
||||||
|
#define ONS(_t,_a,_f,_n,_s) _t((_a), INTSTR_LENGTH + strlen (_s), \
|
||||||
|
(_f), (_n), (_s))
|
||||||
|
|
||||||
|
#define OUT_OF_MEM() O (fatal, NILF, _("virtual memory exhausted"))
|
||||||
|
|
||||||
void die (int) __attribute__ ((noreturn));
|
void die (int) __attribute__ ((noreturn));
|
||||||
void log_working_directory (int);
|
|
||||||
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
||||||
void perror_with_name (const char *, const char *);
|
void perror_with_name (const char *, const char *);
|
||||||
|
#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
|
||||||
void *xmalloc (unsigned int);
|
void *xmalloc (unsigned int);
|
||||||
void *xcalloc (unsigned int);
|
void *xcalloc (unsigned int);
|
||||||
void *xrealloc (void *, unsigned int);
|
void *xrealloc (void *, unsigned int);
|
||||||
@@ -399,7 +511,6 @@ int alpha_compare (const void *, const void *);
|
|||||||
void print_spaces (unsigned int);
|
void print_spaces (unsigned int);
|
||||||
char *find_percent (char *);
|
char *find_percent (char *);
|
||||||
const char *find_percent_cached (const char **);
|
const char *find_percent_cached (const char **);
|
||||||
FILE *open_tmpfile (char **, const char *);
|
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
int ar_name (const char *);
|
int ar_name (const char *);
|
||||||
@@ -408,9 +519,9 @@ int ar_touch (const char *);
|
|||||||
time_t ar_member_date (const char *);
|
time_t ar_member_date (const char *);
|
||||||
|
|
||||||
typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
||||||
long int hdrpos, long int datapos,
|
long int hdrpos, long int datapos,
|
||||||
long int size, long int date, int uid,
|
long int size, long int date, int uid,
|
||||||
int gid, int mode, const void *arg);
|
int gid, int mode, const void *arg);
|
||||||
|
|
||||||
long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
|
long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
|
||||||
int ar_name_equal (const char *name, const char *mem, int truncated);
|
int ar_name_equal (const char *name, const char *mem, int truncated);
|
||||||
@@ -427,6 +538,7 @@ const char *dir_name (const char *);
|
|||||||
void hash_init_directories (void);
|
void hash_init_directories (void);
|
||||||
|
|
||||||
void define_default_variables (void);
|
void define_default_variables (void);
|
||||||
|
void undefine_default_variables (void);
|
||||||
void set_default_suffixes (void);
|
void set_default_suffixes (void);
|
||||||
void install_default_suffix_rules (void);
|
void install_default_suffix_rules (void);
|
||||||
void install_default_implicit_rules (void);
|
void install_default_implicit_rules (void);
|
||||||
@@ -443,21 +555,24 @@ void user_access (void);
|
|||||||
void make_access (void);
|
void make_access (void);
|
||||||
void child_access (void);
|
void child_access (void);
|
||||||
|
|
||||||
void close_stdout (void);
|
|
||||||
|
|
||||||
char *strip_whitespace (const char **begpp, const char **endpp);
|
char *strip_whitespace (const char **begpp, const char **endpp);
|
||||||
|
|
||||||
|
void show_goal_error ();
|
||||||
|
|
||||||
/* String caching */
|
/* String caching */
|
||||||
void strcache_init (void);
|
void strcache_init (void);
|
||||||
void strcache_print_stats (const char *prefix);
|
void strcache_print_stats (const char *prefix);
|
||||||
int strcache_iscached (const char *str);
|
int strcache_iscached (const char *str);
|
||||||
const char *strcache_add (const char *str);
|
const char *strcache_add (const char *str);
|
||||||
const char *strcache_add_len (const char *str, int len);
|
const char *strcache_add_len (const char *str, unsigned int len);
|
||||||
int strcache_setbufsize (int size);
|
|
||||||
|
|
||||||
#ifdef HAVE_VFORK_H
|
/* Guile support */
|
||||||
# include <vfork.h>
|
int guile_gmake_setup (const gmk_floc *flocp);
|
||||||
#endif
|
|
||||||
|
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
||||||
|
typedef int (*load_func_t)(const gmk_floc *flocp);
|
||||||
|
int load_file (const gmk_floc *flocp, const char **filename, int noerror);
|
||||||
|
void unload_file (const char *name);
|
||||||
|
|
||||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||||
because such systems often declare them in header files anyway. */
|
because such systems often declare them in header files anyway. */
|
||||||
@@ -502,18 +617,25 @@ int strncasecmp (const char *s1, const char *s2, int n);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const struct floc *reading_file;
|
#define OUTPUT_SYNC_NONE 0
|
||||||
extern const struct floc **expanding_var;
|
#define OUTPUT_SYNC_LINE 1
|
||||||
|
#define OUTPUT_SYNC_TARGET 2
|
||||||
|
#define OUTPUT_SYNC_RECURSE 3
|
||||||
|
|
||||||
|
extern const gmk_floc *reading_file;
|
||||||
|
extern const gmk_floc **expanding_var;
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
extern unsigned short stopchar_map[];
|
||||||
|
|
||||||
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
||||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_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 env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||||
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||||
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
|
extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
|
||||||
extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
|
extern int not_parallel, second_expansion, clock_skew_detected;
|
||||||
extern int one_shell;
|
extern int rebuilding_makefiles, one_shell, output_sync, verify_flag;
|
||||||
|
|
||||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||||
extern int batch_mode_shell;
|
extern int batch_mode_shell;
|
||||||
@@ -524,15 +646,48 @@ extern int batch_mode_shell;
|
|||||||
extern char cmd_prefix;
|
extern char cmd_prefix;
|
||||||
|
|
||||||
extern unsigned int job_slots;
|
extern unsigned int job_slots;
|
||||||
extern int job_fds[2];
|
|
||||||
extern int job_rfd;
|
|
||||||
#ifndef NO_FLOAT
|
#ifndef NO_FLOAT
|
||||||
extern double max_load_average;
|
extern double max_load_average;
|
||||||
#else
|
#else
|
||||||
extern int max_load_average;
|
extern int max_load_average;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
extern char *program;
|
extern char *program;
|
||||||
|
#else
|
||||||
|
extern const char *program;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
const char *vms_command (const char *argv0);
|
||||||
|
const char *vms_progname (const char *argv0);
|
||||||
|
|
||||||
|
void vms_exit (int);
|
||||||
|
# define _exit(foo) vms_exit(foo)
|
||||||
|
# define exit(foo) vms_exit(foo)
|
||||||
|
|
||||||
|
extern char *program_name;
|
||||||
|
|
||||||
|
void
|
||||||
|
set_program_name (const char *arv0);
|
||||||
|
|
||||||
|
int
|
||||||
|
need_vms_symbol (void);
|
||||||
|
|
||||||
|
int
|
||||||
|
create_foreign_command (const char *command, const char *image);
|
||||||
|
|
||||||
|
int
|
||||||
|
vms_export_dcl_symbol (const char *name, const char *value);
|
||||||
|
|
||||||
|
int
|
||||||
|
vms_putenv_symbol (const char *string);
|
||||||
|
|
||||||
|
void
|
||||||
|
vms_restore_symbol (const char *string);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
extern char *starting_directory;
|
extern char *starting_directory;
|
||||||
extern unsigned int makelevel;
|
extern unsigned int makelevel;
|
||||||
extern char *version_string, *remote_description, *make_host;
|
extern char *version_string, *remote_description, *make_host;
|
||||||
@@ -549,15 +704,10 @@ extern int handling_fatal_signal;
|
|||||||
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
# define MAKE_SUCCESS 1
|
#define MAKE_SUCCESS 0
|
||||||
# define MAKE_TROUBLE 2
|
#define MAKE_TROUBLE 1
|
||||||
# define MAKE_FAILURE 3
|
#define MAKE_FAILURE 2
|
||||||
#else
|
|
||||||
# define MAKE_SUCCESS 0
|
|
||||||
# define MAKE_TROUBLE 1
|
|
||||||
# define MAKE_FAILURE 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set up heap debugging library dmalloc. */
|
/* Set up heap debugging library dmalloc. */
|
||||||
|
|
||||||
461
misc.c
461
misc.c
@@ -1,7 +1,5 @@
|
|||||||
/* Miscellaneous generic support functions for GNU Make.
|
/* Miscellaneous generic support functions for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -16,42 +14,21 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
#include "filedef.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* Variadic functions. We go through contortions to allow proper function
|
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||||
prototypes for both ANSI and pre-ANSI C compilers, and also for those
|
|
||||||
which support stdarg.h vs. varargs.h, and finally those which have
|
|
||||||
vfprintf(), etc. and those who have _doprnt... or nothing.
|
|
||||||
|
|
||||||
This fancy stuff all came from GNU fileutils, except for the VA_PRINTF and
|
#include <stdarg.h>
|
||||||
VA_END macros used here since we have multiple print functions. */
|
|
||||||
|
|
||||||
#if USE_VARIADIC
|
#ifdef HAVE_FCNTL_H
|
||||||
# if HAVE_STDARG_H
|
# include <fcntl.h>
|
||||||
# include <stdarg.h>
|
|
||||||
# define VA_START(args, lastarg) va_start(args, lastarg)
|
|
||||||
# else
|
|
||||||
# include <varargs.h>
|
|
||||||
# define VA_START(args, lastarg) va_start(args)
|
|
||||||
# endif
|
|
||||||
# if HAVE_VPRINTF
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) vfprintf((fp), (lastarg), (args))
|
|
||||||
# else
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) _doprnt((lastarg), (args), (fp))
|
|
||||||
# endif
|
|
||||||
# define VA_END(args) va_end(args)
|
|
||||||
#else
|
#else
|
||||||
/* We can't use any variadic interface! */
|
# include <sys/file.h>
|
||||||
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
|
|
||||||
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
|
|
||||||
# define VA_START(args, lastarg)
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) fprintf((fp), (lastarg), va_alist)
|
|
||||||
# define VA_END(args)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Compare strings *S1 and *S2.
|
/* Compare strings *S1 and *S2.
|
||||||
Return negative if the first is less, positive if it is greater,
|
Return negative if the first is less, positive if it is greater,
|
||||||
zero if they are equal. */
|
zero if they are equal. */
|
||||||
@@ -74,9 +51,7 @@ alpha_compare (const void *v1, const void *v2)
|
|||||||
void
|
void
|
||||||
collapse_continuations (char *line)
|
collapse_continuations (char *line)
|
||||||
{
|
{
|
||||||
register char *in, *out, *p;
|
char *in, *out, *p;
|
||||||
register int backslash;
|
|
||||||
register unsigned int bs_write;
|
|
||||||
|
|
||||||
in = strchr (line, '\n');
|
in = strchr (line, '\n');
|
||||||
if (in == 0)
|
if (in == 0)
|
||||||
@@ -89,62 +64,65 @@ collapse_continuations (char *line)
|
|||||||
while (*in != '\0')
|
while (*in != '\0')
|
||||||
{
|
{
|
||||||
/* BS_WRITE gets the number of quoted backslashes at
|
/* BS_WRITE gets the number of quoted backslashes at
|
||||||
the end just before IN, and BACKSLASH gets nonzero
|
the end just before IN, and BACKSLASH gets nonzero
|
||||||
if the next character is quoted. */
|
if the next character is quoted. */
|
||||||
backslash = 0;
|
unsigned int backslash = 0;
|
||||||
bs_write = 0;
|
unsigned int bs_write = 0;
|
||||||
for (p = in - 1; p >= line && *p == '\\'; --p)
|
for (p = in - 1; p >= line && *p == '\\'; --p)
|
||||||
{
|
{
|
||||||
if (backslash)
|
if (backslash)
|
||||||
++bs_write;
|
++bs_write;
|
||||||
backslash = !backslash;
|
backslash = !backslash;
|
||||||
|
|
||||||
/* It should be impossible to go back this far without exiting,
|
/* It should be impossible to go back this far without exiting,
|
||||||
but if we do, we can't get the right answer. */
|
but if we do, we can't get the right answer. */
|
||||||
if (in == out - 1)
|
if (in == out - 1)
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output the appropriate number of backslashes. */
|
/* Output the appropriate number of backslashes. */
|
||||||
while (bs_write-- > 0)
|
while (bs_write-- > 0)
|
||||||
*out++ = '\\';
|
*out++ = '\\';
|
||||||
|
|
||||||
/* Skip the newline. */
|
/* Skip the newline. */
|
||||||
++in;
|
++in;
|
||||||
|
|
||||||
/* If the newline is escaped, discard following whitespace leaving just
|
|
||||||
one space. POSIX requires that each backslash/newline/following
|
|
||||||
whitespace sequence be reduced to a single space. */
|
|
||||||
if (backslash)
|
if (backslash)
|
||||||
{
|
{
|
||||||
in = next_token (in);
|
/* Backslash/newline handling:
|
||||||
/* Removing this loop will fix Savannah bug #16670: do we want to? */
|
In traditional GNU make all trailing whitespace, consecutive
|
||||||
while (out > line && isblank ((unsigned char)out[-1]))
|
backslash/newlines, and any leading non-newline whitespace on the
|
||||||
--out;
|
next line is reduced to a single space.
|
||||||
*out++ = ' ';
|
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
|
else
|
||||||
/* If the newline isn't quoted, put it in the output. */
|
/* If the newline isn't quoted, put it in the output. */
|
||||||
*out++ = '\n';
|
*out++ = '\n';
|
||||||
|
|
||||||
/* Now copy the following line to the output.
|
/* Now copy the following line to the output.
|
||||||
Stop when we find backslashes followed by a newline. */
|
Stop when we find backslashes followed by a newline. */
|
||||||
while (*in != '\0')
|
while (*in != '\0')
|
||||||
if (*in == '\\')
|
if (*in == '\\')
|
||||||
{
|
{
|
||||||
p = in + 1;
|
p = in + 1;
|
||||||
while (*p == '\\')
|
while (*p == '\\')
|
||||||
++p;
|
++p;
|
||||||
if (*p == '\n')
|
if (*p == '\n')
|
||||||
{
|
{
|
||||||
in = p;
|
in = p;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (in < p)
|
while (in < p)
|
||||||
*out++ = *in++;
|
*out++ = *in++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*out++ = *in++;
|
*out++ = *in++;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = '\0';
|
*out = '\0';
|
||||||
@@ -164,28 +142,19 @@ print_spaces (unsigned int n)
|
|||||||
This string lives in static, re-used memory. */
|
This string lives in static, re-used memory. */
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
|
||||||
concat (unsigned int num, ...)
|
concat (unsigned int num, ...)
|
||||||
#else
|
|
||||||
concat (num, va_alist)
|
|
||||||
unsigned int num;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static unsigned int rlen = 0;
|
static unsigned int rlen = 0;
|
||||||
static char *result = NULL;
|
static char *result = NULL;
|
||||||
int ri = 0;
|
unsigned int ri = 0;
|
||||||
|
|
||||||
#if USE_VARIADIC
|
|
||||||
va_list args;
|
va_list args;
|
||||||
#endif
|
|
||||||
|
|
||||||
VA_START (args, num);
|
va_start (args, num);
|
||||||
|
|
||||||
while (num-- > 0)
|
while (num-- > 0)
|
||||||
{
|
{
|
||||||
const char *s = va_arg (args, const char *);
|
const char *s = va_arg (args, const char *);
|
||||||
unsigned int l = s ? strlen (s) : 0;
|
unsigned int l = xstrlen (s);
|
||||||
|
|
||||||
if (l == 0)
|
if (l == 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -200,7 +169,7 @@ concat (num, va_alist)
|
|||||||
ri += l;
|
ri += l;
|
||||||
}
|
}
|
||||||
|
|
||||||
VA_END (args);
|
va_end (args);
|
||||||
|
|
||||||
/* Get some more memory if we don't have enough space for the
|
/* Get some more memory if we don't have enough space for the
|
||||||
terminating '\0'. */
|
terminating '\0'. */
|
||||||
@@ -215,113 +184,9 @@ concat (num, va_alist)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print a message on stdout. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
|
||||||
message (int prefix, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
message (prefix, fmt, va_alist)
|
|
||||||
int prefix;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if USE_VARIADIC
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (fmt != 0)
|
|
||||||
{
|
|
||||||
if (prefix)
|
|
||||||
{
|
|
||||||
if (makelevel == 0)
|
|
||||||
printf ("%s: ", program);
|
|
||||||
else
|
|
||||||
printf ("%s[%u]: ", program, makelevel);
|
|
||||||
}
|
|
||||||
VA_START (args, fmt);
|
|
||||||
VA_PRINTF (stdout, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
putchar ('\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
fflush (stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
|
||||||
error (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
error (flocp, fmt, va_alist)
|
|
||||||
const struct floc *flocp;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if USE_VARIADIC
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (flocp && flocp->filenm)
|
|
||||||
fprintf (stderr, "%s:%lu: ", flocp->filenm, flocp->lineno);
|
|
||||||
else if (makelevel == 0)
|
|
||||||
fprintf (stderr, "%s: ", program);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "%s[%u]: ", program, makelevel);
|
|
||||||
|
|
||||||
VA_START(args, fmt);
|
|
||||||
VA_PRINTF (stderr, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
|
|
||||||
putc ('\n', stderr);
|
|
||||||
fflush (stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message and exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
|
||||||
fatal (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
fatal (flocp, fmt, va_alist)
|
|
||||||
const struct floc *flocp;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if USE_VARIADIC
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (flocp && flocp->filenm)
|
|
||||||
fprintf (stderr, "%s:%lu: *** ", flocp->filenm, flocp->lineno);
|
|
||||||
else if (makelevel == 0)
|
|
||||||
fprintf (stderr, "%s: *** ", program);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "%s[%u]: *** ", program, makelevel);
|
|
||||||
|
|
||||||
VA_START(args, fmt);
|
|
||||||
VA_PRINTF (stderr, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
|
|
||||||
fputs (_(". Stop.\n"), stderr);
|
|
||||||
|
|
||||||
die (2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
#ifndef HAVE_STRERROR
|
||||||
|
#undef strerror
|
||||||
#undef strerror
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strerror (int errnum)
|
strerror (int errnum)
|
||||||
{
|
{
|
||||||
@@ -338,24 +203,6 @@ strerror (int errnum)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Print an error message from errno. */
|
|
||||||
|
|
||||||
void
|
|
||||||
perror_with_name (const char *str, const char *name)
|
|
||||||
{
|
|
||||||
error (NILF, _("%s%s: %s"), str, name, strerror (errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message from errno and exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
pfatal_with_name (const char *name)
|
|
||||||
{
|
|
||||||
fatal (NILF, _("%s: %s"), name, strerror (errno));
|
|
||||||
|
|
||||||
/* NOTREACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Like malloc but get fatal error if memory is exhausted. */
|
/* Like malloc but get fatal error if memory is exhausted. */
|
||||||
/* Don't bother if we're using dmalloc; it provides these for us. */
|
/* Don't bother if we're using dmalloc; it provides these for us. */
|
||||||
@@ -373,7 +220,7 @@ xmalloc (unsigned int size)
|
|||||||
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||||
void *result = malloc (size ? size : 1);
|
void *result = malloc (size ? size : 1);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +231,7 @@ xcalloc (unsigned int size)
|
|||||||
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||||
void *result = calloc (size ? size : 1, 1);
|
void *result = calloc (size ? size : 1, 1);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,7 +246,7 @@ xrealloc (void *ptr, unsigned int size)
|
|||||||
size = 1;
|
size = 1;
|
||||||
result = ptr ? realloc (ptr, size) : malloc (size);
|
result = ptr ? realloc (ptr, size) : malloc (size);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,7 +263,7 @@ xstrdup (const char *ptr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
|
|
||||||
#ifdef HAVE_STRDUP
|
#ifdef HAVE_STRDUP
|
||||||
return result;
|
return result;
|
||||||
@@ -435,7 +282,7 @@ xstrndup (const char *str, unsigned int length)
|
|||||||
#ifdef HAVE_STRNDUP
|
#ifdef HAVE_STRNDUP
|
||||||
result = strndup (str, length);
|
result = strndup (str, length);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
#else
|
#else
|
||||||
result = xmalloc (length + 1);
|
result = xmalloc (length + 1);
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
@@ -468,48 +315,16 @@ lindex (const char *s, const char *limit, int c)
|
|||||||
char *
|
char *
|
||||||
end_of_token (const char *s)
|
end_of_token (const char *s)
|
||||||
{
|
{
|
||||||
while (*s != '\0' && !isblank ((unsigned char)*s))
|
END_OF_TOKEN (s);
|
||||||
++s;
|
|
||||||
return (char *)s;
|
return (char *)s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
|
||||||
/*
|
|
||||||
* Same as end_of_token, but take into account a stop character
|
|
||||||
*/
|
|
||||||
char *
|
|
||||||
end_of_token_w32 (const char *s, char stopchar)
|
|
||||||
{
|
|
||||||
const char *p = s;
|
|
||||||
int backslash = 0;
|
|
||||||
|
|
||||||
while (*p != '\0' && *p != stopchar
|
|
||||||
&& (backslash || !isblank ((unsigned char)*p)))
|
|
||||||
{
|
|
||||||
if (*p++ == '\\')
|
|
||||||
{
|
|
||||||
backslash = !backslash;
|
|
||||||
while (*p == '\\')
|
|
||||||
{
|
|
||||||
backslash = !backslash;
|
|
||||||
++p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
backslash = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (char *)p;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Return the address of the first nonwhitespace or null in the string S. */
|
/* Return the address of the first nonwhitespace or null in the string S. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
next_token (const char *s)
|
next_token (const char *s)
|
||||||
{
|
{
|
||||||
while (isblank ((unsigned char)*s))
|
NEXT_TOKEN (s);
|
||||||
++s;
|
|
||||||
return (char *)s;
|
return (char *)s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,7 +348,7 @@ find_next_token (const char **ptr, unsigned int *lengthptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Copy a chain of `struct dep'. For 2nd expansion deps, dup the name. */
|
/* Copy a chain of 'struct dep'. For 2nd expansion deps, dup the name. */
|
||||||
|
|
||||||
struct dep *
|
struct dep *
|
||||||
copy_dep_chain (const struct dep *d)
|
copy_dep_chain (const struct dep *d)
|
||||||
@@ -551,9 +366,9 @@ copy_dep_chain (const struct dep *d)
|
|||||||
|
|
||||||
c->next = 0;
|
c->next = 0;
|
||||||
if (firstnew == 0)
|
if (firstnew == 0)
|
||||||
firstnew = lastnew = c;
|
firstnew = lastnew = c;
|
||||||
else
|
else
|
||||||
lastnew = lastnew->next = c;
|
lastnew = lastnew->next = c;
|
||||||
|
|
||||||
d = d->next;
|
d = d->next;
|
||||||
}
|
}
|
||||||
@@ -561,19 +376,6 @@ copy_dep_chain (const struct dep *d)
|
|||||||
return firstnew;
|
return firstnew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free a chain of 'struct dep'. */
|
|
||||||
|
|
||||||
void
|
|
||||||
free_dep_chain (struct dep *d)
|
|
||||||
{
|
|
||||||
while (d != 0)
|
|
||||||
{
|
|
||||||
struct dep *df = d;
|
|
||||||
d = d->next;
|
|
||||||
free_dep (df);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free a chain of struct nameseq.
|
/* Free a chain of struct nameseq.
|
||||||
For struct dep chains use free_dep_chain. */
|
For struct dep chains use free_dep_chain. */
|
||||||
|
|
||||||
@@ -584,13 +386,12 @@ free_ns_chain (struct nameseq *ns)
|
|||||||
{
|
{
|
||||||
struct nameseq *t = ns;
|
struct nameseq *t = ns;
|
||||||
ns = ns->next;
|
ns = ns->next;
|
||||||
free (t);
|
free_ns (t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if !HAVE_STRCASECMP && !HAVE_STRICMP && !HAVE_STRCMPI
|
#if !HAVE_STRCASECMP && !HAVE_STRICMP && !HAVE_STRCMPI
|
||||||
|
|
||||||
/* If we don't have strcasecmp() (from POSIX), or anything that can substitute
|
/* If we don't have strcasecmp() (from POSIX), or anything that can substitute
|
||||||
for it, define our own version. */
|
for it, define our own version. */
|
||||||
|
|
||||||
@@ -616,7 +417,6 @@ strcasecmp (const char *s1, const char *s2)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !HAVE_STRNCASECMP && !HAVE_STRNICMP && !HAVE_STRNCMPI
|
#if !HAVE_STRNCASECMP && !HAVE_STRNICMP && !HAVE_STRNCMPI
|
||||||
|
|
||||||
/* If we don't have strncasecmp() (from POSIX), or anything that can
|
/* If we don't have strncasecmp() (from POSIX), or anything that can
|
||||||
substitute for it, define our own version. */
|
substitute for it, define our own version. */
|
||||||
|
|
||||||
@@ -643,7 +443,7 @@ strncasecmp (const char *s1, const char *s2, int n)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
#ifdef POSIX
|
#ifdef POSIX
|
||||||
|
|
||||||
@@ -656,7 +456,7 @@ strncasecmp (const char *s1, const char *s2, int n)
|
|||||||
#undef HAVE_SETREUID
|
#undef HAVE_SETREUID
|
||||||
#undef HAVE_SETREGID
|
#undef HAVE_SETREGID
|
||||||
|
|
||||||
#else /* Not POSIX. */
|
#else /* Not POSIX. */
|
||||||
|
|
||||||
/* Some POSIX.1 systems have the seteuid and setegid functions. In a
|
/* Some POSIX.1 systems have the seteuid and setegid functions. In a
|
||||||
POSIX-like system, they are the best thing to use. However, some
|
POSIX-like system, they are the best thing to use. However, some
|
||||||
@@ -666,30 +466,30 @@ strncasecmp (const char *s1, const char *s2, int n)
|
|||||||
#undef HAVE_SETEUID
|
#undef HAVE_SETEUID
|
||||||
#undef HAVE_SETEGID
|
#undef HAVE_SETEGID
|
||||||
|
|
||||||
#endif /* POSIX. */
|
#endif /* POSIX. */
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
#ifndef HAVE_UNISTD_H
|
||||||
extern int getuid (), getgid (), geteuid (), getegid ();
|
extern int getuid (), getgid (), geteuid (), getegid ();
|
||||||
extern int setuid (), setgid ();
|
extern int setuid (), setgid ();
|
||||||
#ifdef HAVE_SETEUID
|
#ifdef HAVE_SETEUID
|
||||||
extern int seteuid ();
|
extern int seteuid ();
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SETREUID
|
#ifdef HAVE_SETREUID
|
||||||
extern int setreuid ();
|
extern int setreuid ();
|
||||||
#endif /* Have setreuid. */
|
#endif /* Have setreuid. */
|
||||||
#endif /* Have seteuid. */
|
#endif /* Have seteuid. */
|
||||||
#ifdef HAVE_SETEGID
|
#ifdef HAVE_SETEGID
|
||||||
extern int setegid ();
|
extern int setegid ();
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SETREGID
|
#ifdef HAVE_SETREGID
|
||||||
extern int setregid ();
|
extern int setregid ();
|
||||||
#endif /* Have setregid. */
|
#endif /* Have setregid. */
|
||||||
#endif /* Have setegid. */
|
#endif /* Have setegid. */
|
||||||
#endif /* No <unistd.h>. */
|
#endif /* No <unistd.h>. */
|
||||||
|
|
||||||
/* Keep track of the user and group IDs for user- and make- access. */
|
/* Keep track of the user and group IDs for user- and make- access. */
|
||||||
static int user_uid = -1, user_gid = -1, make_uid = -1, make_gid = -1;
|
static int user_uid = -1, user_gid = -1, make_uid = -1, make_gid = -1;
|
||||||
#define access_inited (user_uid != -1)
|
#define access_inited (user_uid != -1)
|
||||||
static enum { make, user } current_access;
|
static enum { make, user } current_access;
|
||||||
|
|
||||||
|
|
||||||
@@ -706,7 +506,7 @@ log_access (const char *flavor)
|
|||||||
run in a child fork whose stdout is piped. */
|
run in a child fork whose stdout is piped. */
|
||||||
|
|
||||||
fprintf (stderr, _("%s: user %lu (real %lu), group %lu (real %lu)\n"),
|
fprintf (stderr, _("%s: user %lu (real %lu), group %lu (real %lu)\n"),
|
||||||
flavor, (unsigned long) geteuid (), (unsigned long) getuid (),
|
flavor, (unsigned long) geteuid (), (unsigned long) getuid (),
|
||||||
(unsigned long) getegid (), (unsigned long) getgid ());
|
(unsigned long) getegid (), (unsigned long) getgid ());
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
}
|
}
|
||||||
@@ -732,14 +532,14 @@ init_access (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* GETLOADAVG_PRIVILEGED */
|
#endif /* GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Give the process appropriate permissions for access to
|
/* Give the process appropriate permissions for access to
|
||||||
user data (i.e., to stat files, or to spawn a child process). */
|
user data (i.e., to stat files, or to spawn a child process). */
|
||||||
void
|
void
|
||||||
user_access (void)
|
user_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
if (!access_inited)
|
if (!access_inited)
|
||||||
init_access ();
|
init_access ();
|
||||||
@@ -752,7 +552,7 @@ user_access (void)
|
|||||||
We now want to set the effective user and group IDs to the real IDs,
|
We now want to set the effective user and group IDs to the real IDs,
|
||||||
which are the IDs of the process that exec'd make. */
|
which are the IDs of the process that exec'd make. */
|
||||||
|
|
||||||
#ifdef HAVE_SETEUID
|
#ifdef HAVE_SETEUID
|
||||||
|
|
||||||
/* Modern systems have the seteuid/setegid calls which set only the
|
/* Modern systems have the seteuid/setegid calls which set only the
|
||||||
effective IDs, which is ideal. */
|
effective IDs, which is ideal. */
|
||||||
@@ -760,9 +560,9 @@ user_access (void)
|
|||||||
if (seteuid (user_uid) < 0)
|
if (seteuid (user_uid) < 0)
|
||||||
pfatal_with_name ("user_access: seteuid");
|
pfatal_with_name ("user_access: seteuid");
|
||||||
|
|
||||||
#else /* Not HAVE_SETEUID. */
|
#else /* Not HAVE_SETEUID. */
|
||||||
|
|
||||||
#ifndef HAVE_SETREUID
|
#ifndef HAVE_SETREUID
|
||||||
|
|
||||||
/* System V has only the setuid/setgid calls to set user/group IDs.
|
/* System V has only the setuid/setgid calls to set user/group IDs.
|
||||||
There is an effective ID, which can be set by setuid/setgid.
|
There is an effective ID, which can be set by setuid/setgid.
|
||||||
@@ -775,7 +575,7 @@ user_access (void)
|
|||||||
if (setuid (user_uid) < 0)
|
if (setuid (user_uid) < 0)
|
||||||
pfatal_with_name ("user_access: setuid");
|
pfatal_with_name ("user_access: setuid");
|
||||||
|
|
||||||
#else /* HAVE_SETREUID. */
|
#else /* HAVE_SETREUID. */
|
||||||
|
|
||||||
/* In 4BSD, the setreuid/setregid calls set both the real and effective IDs.
|
/* In 4BSD, the setreuid/setregid calls set both the real and effective IDs.
|
||||||
They may be set to themselves or each other. So you have two alternatives
|
They may be set to themselves or each other. So you have two alternatives
|
||||||
@@ -787,14 +587,14 @@ user_access (void)
|
|||||||
if (setreuid (make_uid, user_uid) < 0)
|
if (setreuid (make_uid, user_uid) < 0)
|
||||||
pfatal_with_name ("user_access: setreuid");
|
pfatal_with_name ("user_access: setreuid");
|
||||||
|
|
||||||
#endif /* Not HAVE_SETREUID. */
|
#endif /* Not HAVE_SETREUID. */
|
||||||
#endif /* HAVE_SETEUID. */
|
#endif /* HAVE_SETEUID. */
|
||||||
|
|
||||||
#ifdef HAVE_SETEGID
|
#ifdef HAVE_SETEGID
|
||||||
if (setegid (user_gid) < 0)
|
if (setegid (user_gid) < 0)
|
||||||
pfatal_with_name ("user_access: setegid");
|
pfatal_with_name ("user_access: setegid");
|
||||||
#else
|
#else
|
||||||
#ifndef HAVE_SETREGID
|
#ifndef HAVE_SETREGID
|
||||||
if (setgid (user_gid) < 0)
|
if (setgid (user_gid) < 0)
|
||||||
pfatal_with_name ("user_access: setgid");
|
pfatal_with_name ("user_access: setgid");
|
||||||
#else
|
#else
|
||||||
@@ -807,7 +607,7 @@ user_access (void)
|
|||||||
|
|
||||||
log_access (_("User access"));
|
log_access (_("User access"));
|
||||||
|
|
||||||
#endif /* GETLOADAVG_PRIVILEGED */
|
#endif /* GETLOADAVG_PRIVILEGED */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Give the process appropriate permissions for access to
|
/* Give the process appropriate permissions for access to
|
||||||
@@ -815,7 +615,7 @@ user_access (void)
|
|||||||
void
|
void
|
||||||
make_access (void)
|
make_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
if (!access_inited)
|
if (!access_inited)
|
||||||
init_access ();
|
init_access ();
|
||||||
@@ -825,11 +625,11 @@ make_access (void)
|
|||||||
|
|
||||||
/* See comments in user_access, above. */
|
/* See comments in user_access, above. */
|
||||||
|
|
||||||
#ifdef HAVE_SETEUID
|
#ifdef HAVE_SETEUID
|
||||||
if (seteuid (make_uid) < 0)
|
if (seteuid (make_uid) < 0)
|
||||||
pfatal_with_name ("make_access: seteuid");
|
pfatal_with_name ("make_access: seteuid");
|
||||||
#else
|
#else
|
||||||
#ifndef HAVE_SETREUID
|
#ifndef HAVE_SETREUID
|
||||||
if (setuid (make_uid) < 0)
|
if (setuid (make_uid) < 0)
|
||||||
pfatal_with_name ("make_access: setuid");
|
pfatal_with_name ("make_access: setuid");
|
||||||
#else
|
#else
|
||||||
@@ -838,11 +638,11 @@ make_access (void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SETEGID
|
#ifdef HAVE_SETEGID
|
||||||
if (setegid (make_gid) < 0)
|
if (setegid (make_gid) < 0)
|
||||||
pfatal_with_name ("make_access: setegid");
|
pfatal_with_name ("make_access: setegid");
|
||||||
#else
|
#else
|
||||||
#ifndef HAVE_SETREGID
|
#ifndef HAVE_SETREGID
|
||||||
if (setgid (make_gid) < 0)
|
if (setgid (make_gid) < 0)
|
||||||
pfatal_with_name ("make_access: setgid");
|
pfatal_with_name ("make_access: setgid");
|
||||||
#else
|
#else
|
||||||
@@ -855,7 +655,7 @@ make_access (void)
|
|||||||
|
|
||||||
log_access (_("Make access"));
|
log_access (_("Make access"));
|
||||||
|
|
||||||
#endif /* GETLOADAVG_PRIVILEGED */
|
#endif /* GETLOADAVG_PRIVILEGED */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Give the process appropriate permissions for a child process.
|
/* Give the process appropriate permissions for a child process.
|
||||||
@@ -863,7 +663,7 @@ make_access (void)
|
|||||||
void
|
void
|
||||||
child_access (void)
|
child_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
if (!access_inited)
|
if (!access_inited)
|
||||||
abort ();
|
abort ();
|
||||||
@@ -871,7 +671,7 @@ child_access (void)
|
|||||||
/* Set both the real and effective UID and GID to the user's.
|
/* Set both the real and effective UID and GID to the user's.
|
||||||
They cannot be changed back to make's. */
|
They cannot be changed back to make's. */
|
||||||
|
|
||||||
#ifndef HAVE_SETREUID
|
#ifndef HAVE_SETREUID
|
||||||
if (setuid (user_uid) < 0)
|
if (setuid (user_uid) < 0)
|
||||||
pfatal_with_name ("child_access: setuid");
|
pfatal_with_name ("child_access: setuid");
|
||||||
#else
|
#else
|
||||||
@@ -879,7 +679,7 @@ child_access (void)
|
|||||||
pfatal_with_name ("child_access: setreuid");
|
pfatal_with_name ("child_access: setreuid");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SETREGID
|
#ifndef HAVE_SETREGID
|
||||||
if (setgid (user_gid) < 0)
|
if (setgid (user_gid) < 0)
|
||||||
pfatal_with_name ("child_access: setgid");
|
pfatal_with_name ("child_access: setgid");
|
||||||
#else
|
#else
|
||||||
@@ -889,9 +689,9 @@ child_access (void)
|
|||||||
|
|
||||||
log_access (_("Child access"));
|
log_access (_("Child access"));
|
||||||
|
|
||||||
#endif /* GETLOADAVG_PRIVILEGED */
|
#endif /* GETLOADAVG_PRIVILEGED */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEED_GET_PATH_MAX
|
#ifdef NEED_GET_PATH_MAX
|
||||||
unsigned int
|
unsigned int
|
||||||
get_path_max (void)
|
get_path_max (void)
|
||||||
@@ -902,58 +702,11 @@ get_path_max (void)
|
|||||||
{
|
{
|
||||||
long int x = pathconf ("/", _PC_PATH_MAX);
|
long int x = pathconf ("/", _PC_PATH_MAX);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
value = x;
|
value = x;
|
||||||
else
|
else
|
||||||
return MAXPATHLEN;
|
return MAXPATHLEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* This code is stolen from gnulib.
|
|
||||||
If/when we abandon the requirement to work with K&R compilers, we can
|
|
||||||
remove this (and perhaps other parts of GNU make!) and migrate to using
|
|
||||||
gnulib directly.
|
|
||||||
|
|
||||||
This is called only through atexit(), which means die() has already been
|
|
||||||
invoked. So, call exit() here directly. Apparently that works...?
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Close standard output, exiting with status 'exit_failure' on failure.
|
|
||||||
If a program writes *anything* to stdout, that program should close
|
|
||||||
stdout and make sure that it succeeds before exiting. Otherwise,
|
|
||||||
suppose that you go to the extreme of checking the return status
|
|
||||||
of every function that does an explicit write to stdout. The last
|
|
||||||
printf can succeed in writing to the internal stream buffer, and yet
|
|
||||||
the fclose(stdout) could still fail (due e.g., to a disk full error)
|
|
||||||
when it tries to write out that buffered data. Thus, you would be
|
|
||||||
left with an incomplete output file and the offending program would
|
|
||||||
exit successfully. Even calling fflush is not always sufficient,
|
|
||||||
since some file systems (NFS and CODA) buffer written/flushed data
|
|
||||||
until an actual close call.
|
|
||||||
|
|
||||||
Besides, it's wasteful to check the return value from every call
|
|
||||||
that writes to stdout -- just let the internal stream state record
|
|
||||||
the failure. That's what the ferror test is checking below.
|
|
||||||
|
|
||||||
It's important to detect such failures and exit nonzero because many
|
|
||||||
tools (most notably `make' and other build-management systems) depend
|
|
||||||
on being able to detect failure in other tools via their exit status. */
|
|
||||||
|
|
||||||
void
|
|
||||||
close_stdout (void)
|
|
||||||
{
|
|
||||||
int prev_fail = ferror (stdout);
|
|
||||||
int fclose_fail = fclose (stdout);
|
|
||||||
|
|
||||||
if (prev_fail || fclose_fail)
|
|
||||||
{
|
|
||||||
if (fclose_fail)
|
|
||||||
error (NILF, _("write error: %s"), strerror (errno));
|
|
||||||
else
|
|
||||||
error (NILF, _("write error"));
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
84
os.h
Normal file
84
os.h
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/* Declarations for operating system interfaces for GNU Make.
|
||||||
|
Copyright (C) 2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
/* This section provides OS-specific functions to support the jobserver. */
|
||||||
|
|
||||||
|
#ifdef MAKE_JOBSERVER
|
||||||
|
|
||||||
|
/* Returns 1 if the jobserver is enabled, else 0. */
|
||||||
|
unsigned int jobserver_enabled ();
|
||||||
|
|
||||||
|
/* Called in the master instance to set up the jobserver initially. */
|
||||||
|
unsigned int jobserver_setup (int job_slots);
|
||||||
|
|
||||||
|
/* Called in a child instance to connect to the jobserver. */
|
||||||
|
unsigned int jobserver_parse_auth (const char* auth);
|
||||||
|
|
||||||
|
/* Returns an allocated buffer used to pass to child instances. */
|
||||||
|
char *jobserver_get_auth ();
|
||||||
|
|
||||||
|
/* Clear this instance's jobserver configuration. */
|
||||||
|
void jobserver_clear ();
|
||||||
|
|
||||||
|
/* Recover all the jobserver tokens and return the number we got. */
|
||||||
|
unsigned int jobserver_acquire_all ();
|
||||||
|
|
||||||
|
/* Release a jobserver token. If it fails and is_fatal is 1, fatal. */
|
||||||
|
void jobserver_release (int is_fatal);
|
||||||
|
|
||||||
|
/* Notify the jobserver that a child exited. */
|
||||||
|
void jobserver_signal ();
|
||||||
|
|
||||||
|
/* Get ready to start a non-recursive child. */
|
||||||
|
void jobserver_pre_child ();
|
||||||
|
|
||||||
|
/* Complete starting a non-recursive child. */
|
||||||
|
void jobserver_post_child ();
|
||||||
|
|
||||||
|
/* Set up to acquire a new token. */
|
||||||
|
void jobserver_pre_acquire ();
|
||||||
|
|
||||||
|
/* Wait until we can acquire a jobserver token.
|
||||||
|
TIMEOUT is 1 if we have other jobs waiting for the load to go down;
|
||||||
|
in this case we won't wait forever, so we can check the load.
|
||||||
|
Returns 1 if we got a token, or 0 if we stopped waiting due to a child
|
||||||
|
exiting or a timeout. */
|
||||||
|
unsigned int jobserver_acquire (int timeout);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define jobserver_enabled() (0)
|
||||||
|
#define jobserver_setup(_slots) (0)
|
||||||
|
#define jobserver_parse_auth(_auth) (0)
|
||||||
|
#define jobserver_get_auth() (NULL)
|
||||||
|
#define jobserver_clear() (void)(0)
|
||||||
|
#define jobserver_release(_fatal) (void)(0)
|
||||||
|
#define jobserver_acquire_all() (0)
|
||||||
|
#define jobserver_signal() (void)(0)
|
||||||
|
#define jobserver_pre_child(_r) (void)(0)
|
||||||
|
#define jobserver_post_child(_r) (void)(0)
|
||||||
|
#define jobserver_pre_acquire() (void)(0)
|
||||||
|
#define jobserver_acquire(_tmout) (0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Create a "bad" file descriptor for stdin when parallel jobs are run. */
|
||||||
|
#if !defined(VMD) && !defined(WINDOWS32) && !defined(_AMIGA) && !defined(__MSDOS__)
|
||||||
|
int get_bad_stdin ();
|
||||||
|
#else
|
||||||
|
# define get_bad_stdin() (-1)
|
||||||
|
#endif
|
||||||
723
output.c
Normal file
723
output.c
Normal file
@@ -0,0 +1,723 @@
|
|||||||
|
/* Output to stdout / stderr for GNU make
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
#include "job.h"
|
||||||
|
|
||||||
|
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# include <fcntl.h>
|
||||||
|
#else
|
||||||
|
# include <sys/file.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
# include <windows.h>
|
||||||
|
# include <io.h>
|
||||||
|
# include "sub_proc.h"
|
||||||
|
#endif /* WINDOWS32 */
|
||||||
|
|
||||||
|
struct output *output_context = NULL;
|
||||||
|
unsigned int stdio_traced = 0;
|
||||||
|
|
||||||
|
#define OUTPUT_NONE (-1)
|
||||||
|
|
||||||
|
#define OUTPUT_ISSET(_out) ((_out)->out >= 0 || (_out)->err >= 0)
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# define STREAM_OK(_s) ((fcntl (fileno (_s), F_GETFD) != -1) || (errno != EBADF))
|
||||||
|
#else
|
||||||
|
# define STREAM_OK(_s) 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Write a string to the current STDOUT or STDERR. */
|
||||||
|
static void
|
||||||
|
_outputs (struct output *out, int is_err, const char *msg)
|
||||||
|
{
|
||||||
|
if (! out || ! out->syncout)
|
||||||
|
{
|
||||||
|
FILE *f = is_err ? stderr : stdout;
|
||||||
|
fputs (msg, f);
|
||||||
|
fflush (f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fd = is_err ? out->err : out->out;
|
||||||
|
int len = strlen (msg);
|
||||||
|
int r;
|
||||||
|
|
||||||
|
EINTRLOOP (r, lseek (fd, 0, SEEK_END));
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
EINTRLOOP (r, write (fd, msg, len));
|
||||||
|
if (r == len || r <= 0)
|
||||||
|
break;
|
||||||
|
len -= r;
|
||||||
|
msg += r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Write a message indicating that we've just entered or
|
||||||
|
left (according to ENTERING) the current directory. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
log_working_directory (int entering)
|
||||||
|
{
|
||||||
|
static char *buf = NULL;
|
||||||
|
static unsigned int len = 0;
|
||||||
|
unsigned int need;
|
||||||
|
const char *fmt;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
/* Get enough space for the longest possible output. */
|
||||||
|
need = strlen (program) + INTSTR_LENGTH + 2 + 1;
|
||||||
|
if (starting_directory)
|
||||||
|
need += strlen (starting_directory);
|
||||||
|
|
||||||
|
/* Use entire sentences to give the translators a fighting chance. */
|
||||||
|
if (makelevel == 0)
|
||||||
|
if (starting_directory == 0)
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s: Entering an unknown directory\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s: Leaving an unknown directory\n");
|
||||||
|
else
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s: Entering directory '%s'\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s: Leaving directory '%s'\n");
|
||||||
|
else
|
||||||
|
if (starting_directory == 0)
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s[%u]: Entering an unknown directory\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s[%u]: Leaving an unknown directory\n");
|
||||||
|
else
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s[%u]: Entering directory '%s'\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s[%u]: Leaving directory '%s'\n");
|
||||||
|
|
||||||
|
need += strlen (fmt);
|
||||||
|
|
||||||
|
if (need > len)
|
||||||
|
{
|
||||||
|
buf = xrealloc (buf, need);
|
||||||
|
len = need;
|
||||||
|
}
|
||||||
|
|
||||||
|
p = buf;
|
||||||
|
if (print_data_base_flag)
|
||||||
|
{
|
||||||
|
*(p++) = '#';
|
||||||
|
*(p++) = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (makelevel == 0)
|
||||||
|
if (starting_directory == 0)
|
||||||
|
sprintf (p, fmt , program);
|
||||||
|
else
|
||||||
|
sprintf (p, fmt, program, starting_directory);
|
||||||
|
else if (starting_directory == 0)
|
||||||
|
sprintf (p, fmt, program, makelevel);
|
||||||
|
else
|
||||||
|
sprintf (p, fmt, program, makelevel, starting_directory);
|
||||||
|
|
||||||
|
_outputs (NULL, 0, buf);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set a file descriptor to be in O_APPEND mode.
|
||||||
|
If it fails, just ignore it. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_append_mode (int fd)
|
||||||
|
{
|
||||||
|
#if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND)
|
||||||
|
int flags = fcntl (fd, F_GETFL, 0);
|
||||||
|
if (flags >= 0)
|
||||||
|
fcntl (fd, F_SETFL, flags | O_APPEND);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
|
||||||
|
/* Semaphore for use in -j mode with output_sync. */
|
||||||
|
static sync_handle_t sync_handle = -1;
|
||||||
|
|
||||||
|
#define FD_NOT_EMPTY(_f) ((_f) != OUTPUT_NONE && lseek ((_f), 0, SEEK_END) > 0)
|
||||||
|
|
||||||
|
/* Set up the sync handle. Disables output_sync on error. */
|
||||||
|
static int
|
||||||
|
sync_init ()
|
||||||
|
{
|
||||||
|
int combined_output = 0;
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
if ((!STREAM_OK (stdout) && !STREAM_OK (stderr))
|
||||||
|
|| (sync_handle = create_mutex ()) == -1)
|
||||||
|
{
|
||||||
|
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||||
|
output_sync = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
combined_output = same_stream (stdout, stderr);
|
||||||
|
prepare_mutex_handle_string (sync_handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
{
|
||||||
|
struct stat stbuf_o, stbuf_e;
|
||||||
|
|
||||||
|
sync_handle = fileno (stdout);
|
||||||
|
combined_output = (fstat (fileno (stdout), &stbuf_o) == 0
|
||||||
|
&& fstat (fileno (stderr), &stbuf_e) == 0
|
||||||
|
&& stbuf_o.st_dev == stbuf_e.st_dev
|
||||||
|
&& stbuf_o.st_ino == stbuf_e.st_ino);
|
||||||
|
}
|
||||||
|
else if (STREAM_OK (stderr))
|
||||||
|
sync_handle = fileno (stderr);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||||
|
output_sync = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return combined_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Support routine for output_sync() */
|
||||||
|
static void
|
||||||
|
pump_from_tmp (int from, FILE *to)
|
||||||
|
{
|
||||||
|
static char buffer[8192];
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
int prev_mode;
|
||||||
|
|
||||||
|
/* "from" is opened by open_tmpfd, which does it in binary mode, so
|
||||||
|
we need the mode of "to" to match that. */
|
||||||
|
prev_mode = _setmode (fileno (to), _O_BINARY);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (lseek (from, 0, SEEK_SET) == -1)
|
||||||
|
perror ("lseek()");
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
EINTRLOOP (len, read (from, buffer, sizeof (buffer)));
|
||||||
|
if (len < 0)
|
||||||
|
perror ("read()");
|
||||||
|
if (len <= 0)
|
||||||
|
break;
|
||||||
|
if (fwrite (buffer, len, 1, to) < 1)
|
||||||
|
{
|
||||||
|
perror ("fwrite()");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fflush (to);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
/* Switch "to" back to its original mode, so that log messages by
|
||||||
|
Make have the same EOL format as without --output-sync. */
|
||||||
|
_setmode (fileno (to), prev_mode);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Obtain the lock for writing output. */
|
||||||
|
static void *
|
||||||
|
acquire_semaphore (void)
|
||||||
|
{
|
||||||
|
static struct flock fl;
|
||||||
|
|
||||||
|
fl.l_type = F_WRLCK;
|
||||||
|
fl.l_whence = SEEK_SET;
|
||||||
|
fl.l_start = 0;
|
||||||
|
fl.l_len = 1;
|
||||||
|
if (fcntl (sync_handle, F_SETLKW, &fl) != -1)
|
||||||
|
return &fl;
|
||||||
|
perror ("fcntl()");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Release the lock for writing output. */
|
||||||
|
static void
|
||||||
|
release_semaphore (void *sem)
|
||||||
|
{
|
||||||
|
struct flock *flp = (struct flock *)sem;
|
||||||
|
flp->l_type = F_UNLCK;
|
||||||
|
if (fcntl (sync_handle, F_SETLKW, flp) == -1)
|
||||||
|
perror ("fcntl()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns a file descriptor to a temporary file. The file is automatically
|
||||||
|
closed/deleted on exit. Don't use a FILE* stream. */
|
||||||
|
int
|
||||||
|
output_tmpfd ()
|
||||||
|
{
|
||||||
|
int fd = -1;
|
||||||
|
FILE *tfile = tmpfile ();
|
||||||
|
|
||||||
|
if (! tfile)
|
||||||
|
pfatal_with_name ("tmpfile");
|
||||||
|
|
||||||
|
/* Create a duplicate so we can close the stream. */
|
||||||
|
fd = dup (fileno (tfile));
|
||||||
|
if (fd < 0)
|
||||||
|
pfatal_with_name ("dup");
|
||||||
|
|
||||||
|
fclose (tfile);
|
||||||
|
|
||||||
|
set_append_mode (fd);
|
||||||
|
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adds file descriptors to the child structure to support output_sync; one
|
||||||
|
for stdout and one for stderr as long as they are open. If stdout and
|
||||||
|
stderr share a device they can share a temp file too.
|
||||||
|
Will reset output_sync on error. */
|
||||||
|
static void
|
||||||
|
setup_tmpfile (struct output *out)
|
||||||
|
{
|
||||||
|
/* Is make's stdout going to the same place as stderr? */
|
||||||
|
static int combined_output = -1;
|
||||||
|
|
||||||
|
if (combined_output < 0)
|
||||||
|
combined_output = sync_init ();
|
||||||
|
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
{
|
||||||
|
int fd = output_tmpfd ();
|
||||||
|
if (fd < 0)
|
||||||
|
goto error;
|
||||||
|
CLOSE_ON_EXEC (fd);
|
||||||
|
out->out = fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (STREAM_OK (stderr))
|
||||||
|
{
|
||||||
|
if (out->out != OUTPUT_NONE && combined_output)
|
||||||
|
out->err = out->out;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fd = output_tmpfd ();
|
||||||
|
if (fd < 0)
|
||||||
|
goto error;
|
||||||
|
CLOSE_ON_EXEC (fd);
|
||||||
|
out->err = fd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* If we failed to create a temp file, disable output sync going forward. */
|
||||||
|
error:
|
||||||
|
output_close (out);
|
||||||
|
output_sync = OUTPUT_SYNC_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Synchronize the output of jobs in -j mode to keep the results of
|
||||||
|
each job together. This is done by holding the results in temp files,
|
||||||
|
one for stdout and potentially another for stderr, and only releasing
|
||||||
|
them to "real" stdout/stderr when a semaphore can be obtained. */
|
||||||
|
|
||||||
|
void
|
||||||
|
output_dump (struct output *out)
|
||||||
|
{
|
||||||
|
int outfd_not_empty = FD_NOT_EMPTY (out->out);
|
||||||
|
int errfd_not_empty = FD_NOT_EMPTY (out->err);
|
||||||
|
|
||||||
|
if (outfd_not_empty || errfd_not_empty)
|
||||||
|
{
|
||||||
|
int traced = 0;
|
||||||
|
|
||||||
|
/* Try to acquire the semaphore. If it fails, dump the output
|
||||||
|
unsynchronized; still better than silently discarding it.
|
||||||
|
We want to keep this lock for as little time as possible. */
|
||||||
|
void *sem = acquire_semaphore ();
|
||||||
|
|
||||||
|
/* Log the working directory for this dump. */
|
||||||
|
if (print_directory_flag && output_sync != OUTPUT_SYNC_RECURSE)
|
||||||
|
traced = log_working_directory (1);
|
||||||
|
|
||||||
|
if (outfd_not_empty)
|
||||||
|
pump_from_tmp (out->out, stdout);
|
||||||
|
if (errfd_not_empty && out->err != out->out)
|
||||||
|
pump_from_tmp (out->err, stderr);
|
||||||
|
|
||||||
|
if (traced)
|
||||||
|
log_working_directory (0);
|
||||||
|
|
||||||
|
/* Exit the critical section. */
|
||||||
|
if (sem)
|
||||||
|
release_semaphore (sem);
|
||||||
|
|
||||||
|
/* Truncate and reset the output, in case we use it again. */
|
||||||
|
if (out->out != OUTPUT_NONE)
|
||||||
|
{
|
||||||
|
int e;
|
||||||
|
lseek (out->out, 0, SEEK_SET);
|
||||||
|
EINTRLOOP (e, ftruncate (out->out, 0));
|
||||||
|
}
|
||||||
|
if (out->err != OUTPUT_NONE && out->err != out->out)
|
||||||
|
{
|
||||||
|
int e;
|
||||||
|
lseek (out->err, 0, SEEK_SET);
|
||||||
|
EINTRLOOP (e, ftruncate (out->err, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* NO_OUTPUT_SYNC */
|
||||||
|
|
||||||
|
|
||||||
|
/* Provide support for temporary files. */
|
||||||
|
|
||||||
|
#ifndef HAVE_STDLIB_H
|
||||||
|
# ifdef HAVE_MKSTEMP
|
||||||
|
int mkstemp (char *template);
|
||||||
|
# else
|
||||||
|
char *mktemp (char *template);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FILE *
|
||||||
|
output_tmpfile (char **name, const char *template)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_FDOPEN
|
||||||
|
int fd;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined HAVE_MKSTEMP || defined HAVE_MKTEMP
|
||||||
|
# define TEMPLATE_LEN strlen (template)
|
||||||
|
#else
|
||||||
|
# define TEMPLATE_LEN L_tmpnam
|
||||||
|
#endif
|
||||||
|
*name = xmalloc (TEMPLATE_LEN + 1);
|
||||||
|
strcpy (*name, template);
|
||||||
|
|
||||||
|
#if defined HAVE_MKSTEMP && defined HAVE_FDOPEN
|
||||||
|
/* It's safest to use mkstemp(), if we can. */
|
||||||
|
fd = mkstemp (*name);
|
||||||
|
if (fd == -1)
|
||||||
|
return 0;
|
||||||
|
return fdopen (fd, "w");
|
||||||
|
#else
|
||||||
|
# ifdef HAVE_MKTEMP
|
||||||
|
(void) mktemp (*name);
|
||||||
|
# else
|
||||||
|
(void) tmpnam (*name);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_FDOPEN
|
||||||
|
/* Can't use mkstemp(), but guard against a race condition. */
|
||||||
|
EINTRLOOP (fd, open (*name, O_CREAT|O_EXCL|O_WRONLY, 0600));
|
||||||
|
if (fd == -1)
|
||||||
|
return 0;
|
||||||
|
return fdopen (fd, "w");
|
||||||
|
# else
|
||||||
|
/* Not secure, but what can we do? */
|
||||||
|
return fopen (*name, "w");
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* This code is stolen from gnulib.
|
||||||
|
If/when we abandon the requirement to work with K&R compilers, we can
|
||||||
|
remove this (and perhaps other parts of GNU make!) and migrate to using
|
||||||
|
gnulib directly.
|
||||||
|
|
||||||
|
This is called only through atexit(), which means die() has already been
|
||||||
|
invoked. So, call exit() here directly. Apparently that works...?
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Close standard output, exiting with status 'exit_failure' on failure.
|
||||||
|
If a program writes *anything* to stdout, that program should close
|
||||||
|
stdout and make sure that it succeeds before exiting. Otherwise,
|
||||||
|
suppose that you go to the extreme of checking the return status
|
||||||
|
of every function that does an explicit write to stdout. The last
|
||||||
|
printf can succeed in writing to the internal stream buffer, and yet
|
||||||
|
the fclose(stdout) could still fail (due e.g., to a disk full error)
|
||||||
|
when it tries to write out that buffered data. Thus, you would be
|
||||||
|
left with an incomplete output file and the offending program would
|
||||||
|
exit successfully. Even calling fflush is not always sufficient,
|
||||||
|
since some file systems (NFS and CODA) buffer written/flushed data
|
||||||
|
until an actual close call.
|
||||||
|
|
||||||
|
Besides, it's wasteful to check the return value from every call
|
||||||
|
that writes to stdout -- just let the internal stream state record
|
||||||
|
the failure. That's what the ferror test is checking below.
|
||||||
|
|
||||||
|
It's important to detect such failures and exit nonzero because many
|
||||||
|
tools (most notably 'make' and other build-management systems) depend
|
||||||
|
on being able to detect failure in other tools via their exit status. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
close_stdout (void)
|
||||||
|
{
|
||||||
|
int prev_fail = ferror (stdout);
|
||||||
|
int fclose_fail = fclose (stdout);
|
||||||
|
|
||||||
|
if (prev_fail || fclose_fail)
|
||||||
|
{
|
||||||
|
if (fclose_fail)
|
||||||
|
perror_with_name (_("write error: stdout"), "");
|
||||||
|
else
|
||||||
|
O (error, NILF, _("write error: stdout"));
|
||||||
|
exit (MAKE_TROUBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
output_init (struct output *out)
|
||||||
|
{
|
||||||
|
if (out)
|
||||||
|
{
|
||||||
|
out->out = out->err = OUTPUT_NONE;
|
||||||
|
out->syncout = !!output_sync;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Configure this instance of make. Be sure stdout is line-buffered. */
|
||||||
|
|
||||||
|
#ifdef HAVE_SETVBUF
|
||||||
|
# ifdef SETVBUF_REVERSED
|
||||||
|
setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ);
|
||||||
|
# else /* setvbuf not reversed. */
|
||||||
|
/* Some buggy systems lose if we pass 0 instead of allocating ourselves. */
|
||||||
|
setvbuf (stdout, 0, _IOLBF, BUFSIZ);
|
||||||
|
# endif /* setvbuf reversed. */
|
||||||
|
#elif HAVE_SETLINEBUF
|
||||||
|
setlinebuf (stdout);
|
||||||
|
#endif /* setlinebuf missing. */
|
||||||
|
|
||||||
|
/* Force stdout/stderr into append mode. This ensures parallel jobs won't
|
||||||
|
lose output due to overlapping writes. */
|
||||||
|
set_append_mode (fileno (stdout));
|
||||||
|
set_append_mode (fileno (stderr));
|
||||||
|
|
||||||
|
#ifdef HAVE_ATEXIT
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
atexit (close_stdout);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
output_close (struct output *out)
|
||||||
|
{
|
||||||
|
if (! out)
|
||||||
|
{
|
||||||
|
if (stdio_traced)
|
||||||
|
log_working_directory (0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
output_dump (out);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (out->out >= 0)
|
||||||
|
close (out->out);
|
||||||
|
if (out->err >= 0 && out->err != out->out)
|
||||||
|
close (out->err);
|
||||||
|
|
||||||
|
output_init (out);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We're about to generate output: be sure it's set up. */
|
||||||
|
void
|
||||||
|
output_start ()
|
||||||
|
{
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
/* If we're syncing output make sure the temporary file is set up. */
|
||||||
|
if (output_context && output_context->syncout)
|
||||||
|
if (! OUTPUT_ISSET(output_context))
|
||||||
|
setup_tmpfile (output_context);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If we're not syncing this output per-line or per-target, make sure we emit
|
||||||
|
the "Entering..." message where appropriate. */
|
||||||
|
if (output_sync == OUTPUT_SYNC_NONE || output_sync == OUTPUT_SYNC_RECURSE)
|
||||||
|
if (! stdio_traced && print_directory_flag)
|
||||||
|
stdio_traced = log_working_directory (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
outputs (int is_err, const char *msg)
|
||||||
|
{
|
||||||
|
if (! msg || *msg == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
|
output_start ();
|
||||||
|
|
||||||
|
_outputs (output_context, is_err, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static struct fmtstring
|
||||||
|
{
|
||||||
|
char *buffer;
|
||||||
|
size_t size;
|
||||||
|
} fmtbuf = { NULL, 0 };
|
||||||
|
|
||||||
|
static char *
|
||||||
|
get_buffer (size_t need)
|
||||||
|
{
|
||||||
|
/* Make sure we have room. NEED includes space for \0. */
|
||||||
|
if (need > fmtbuf.size)
|
||||||
|
{
|
||||||
|
fmtbuf.size += need * 2;
|
||||||
|
fmtbuf.buffer = xrealloc (fmtbuf.buffer, fmtbuf.size);
|
||||||
|
}
|
||||||
|
|
||||||
|
fmtbuf.buffer[need-1] = '\0';
|
||||||
|
|
||||||
|
return fmtbuf.buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print a message on stdout. */
|
||||||
|
|
||||||
|
void
|
||||||
|
message (int prefix, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += strlen (fmt) + strlen (program) + INTSTR_LENGTH + 4 + 1 + 1;
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (prefix)
|
||||||
|
{
|
||||||
|
if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
}
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, "\n");
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (0, fmtbuf.buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message. */
|
||||||
|
|
||||||
|
void
|
||||||
|
error (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += (strlen (fmt) + strlen (program)
|
||||||
|
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||||
|
+ INTSTR_LENGTH + 4 + 1 + 1);
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (flocp && flocp->filenm)
|
||||||
|
sprintf (p, "%s:%lu: ", flocp->filenm, flocp->lineno + flocp->offset);
|
||||||
|
else if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, "\n");
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (1, fmtbuf.buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message and exit. */
|
||||||
|
|
||||||
|
void
|
||||||
|
fatal (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
const char *stop = _(". Stop.\n");
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += (strlen (fmt) + strlen (program)
|
||||||
|
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||||
|
+ INTSTR_LENGTH + 8 + strlen (stop) + 1);
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (flocp && flocp->filenm)
|
||||||
|
sprintf (p, "%s:%lu: *** ", flocp->filenm, flocp->lineno + flocp->offset);
|
||||||
|
else if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: *** ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: *** ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, stop);
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (1, fmtbuf.buffer);
|
||||||
|
|
||||||
|
die (MAKE_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message from errno. */
|
||||||
|
|
||||||
|
void
|
||||||
|
perror_with_name (const char *str, const char *name)
|
||||||
|
{
|
||||||
|
const char *err = strerror (errno);
|
||||||
|
OSSS (error, NILF, _("%s%s: %s"), str, name, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message from errno and exit. */
|
||||||
|
|
||||||
|
void
|
||||||
|
pfatal_with_name (const char *name)
|
||||||
|
{
|
||||||
|
const char *err = strerror (errno);
|
||||||
|
OSS (fatal, NILF, _("%s: %s"), name, err);
|
||||||
|
|
||||||
|
/* NOTREACHED */
|
||||||
|
}
|
||||||
51
output.h
Normal file
51
output.h
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/* Output to stdout / stderr for GNU make
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
struct output
|
||||||
|
{
|
||||||
|
int out;
|
||||||
|
int err;
|
||||||
|
unsigned int syncout:1; /* True if we want to synchronize output. */
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct output *output_context;
|
||||||
|
extern unsigned int stdio_traced;
|
||||||
|
|
||||||
|
#define OUTPUT_SET(_new) do{ output_context = (_new)->syncout ? (_new) : NULL; }while(0)
|
||||||
|
#define OUTPUT_UNSET() do{ output_context = NULL; }while(0)
|
||||||
|
|
||||||
|
#define OUTPUT_TRACED() do{ stdio_traced = 1; }while(0)
|
||||||
|
#define OUTPUT_IS_TRACED() (!!stdio_traced)
|
||||||
|
|
||||||
|
FILE *output_tmpfile (char **, const char *);
|
||||||
|
|
||||||
|
/* Initialize and close a child output structure: if NULL do this program's
|
||||||
|
output (this should only be done once). */
|
||||||
|
void output_init (struct output *out);
|
||||||
|
void output_close (struct output *out);
|
||||||
|
|
||||||
|
/* In situations where output may be about to be displayed but we're not
|
||||||
|
sure if we've set it up yet, call this. */
|
||||||
|
void output_start (void);
|
||||||
|
|
||||||
|
/* Show a message on stdout or stderr. Will start the output if needed. */
|
||||||
|
void outputs (int is_err, const char *msg);
|
||||||
|
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
int output_tmpfd (void);
|
||||||
|
/* Dump any child output content to stdout, and reset it. */
|
||||||
|
void output_dump (struct output *out);
|
||||||
|
#endif
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
*.gmo *.mo *.pot *.po
|
|
||||||
|
|
||||||
Makefile Makefile.in Makefile.in.in Makevars.template
|
|
||||||
Rules-quot stamp-po
|
|
||||||
*.sed *.sin *.header
|
|
||||||
POTFILES
|
|
||||||
15
po/.gitignore
vendored
Normal file
15
po/.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Makefile.in.in
|
||||||
|
Makevars.template
|
||||||
|
POTFILES
|
||||||
|
Rules-quot
|
||||||
|
boldquot.sed
|
||||||
|
en@boldquot.header
|
||||||
|
en@quot.header
|
||||||
|
insert-header.sin
|
||||||
|
make.pot
|
||||||
|
quot.sed
|
||||||
|
remove-potcdate.sin
|
||||||
|
remove-potcdate.sed
|
||||||
|
stamp-po
|
||||||
|
*.gmo
|
||||||
|
*.po
|
||||||
82
po/ChangeLog
82
po/ChangeLog
@@ -1,82 +0,0 @@
|
|||||||
2009-09-16 Paul Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added new translation for Italian (it).
|
|
||||||
|
|
||||||
2008-05-17 Paul Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added new translation for Lithuanian (lt).
|
|
||||||
|
|
||||||
2007-08-15 Paul Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: The Kinyarwanda (rw) translation has disappeared from
|
|
||||||
the translation site, so remove it.
|
|
||||||
|
|
||||||
2006-01-28 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added new translation for Vietnamese (vi).
|
|
||||||
|
|
||||||
2005-07-14 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added new translation for Indonesian (id).
|
|
||||||
|
|
||||||
2005-05-09 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* POTFILES.in: Add new file vmsjobs.c.
|
|
||||||
|
|
||||||
2005-04-06 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added a new translation for Kinywarwanda (rw).
|
|
||||||
|
|
||||||
2005-02-09 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added a new translation for Irish (ga).
|
|
||||||
|
|
||||||
2005-02-01 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added a new translation for Finnish (fi).
|
|
||||||
|
|
||||||
2003-10-18 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added a new translation for Belarusian (be).
|
|
||||||
|
|
||||||
2002-12-19 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Added a new translation for Ukrainian (uk).
|
|
||||||
|
|
||||||
2002-10-05 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* POTFILES.in: Add variable.h as it has a translatable string.
|
|
||||||
|
|
||||||
2002-08-08 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Add a new translation for Chinese (simplified) (zh_CN).
|
|
||||||
|
|
||||||
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS: Add a new translation for Swedish (sv).
|
|
||||||
|
|
||||||
2002-04-21 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* LINGUAS, hr.po: Added new translation: Croatian.
|
|
||||||
|
|
||||||
* da.po, de.po, es.po, fr.po, gl.po, he.po, ja.po, ko.po, nl.po,
|
|
||||||
pl.po, pt_BR.po, ru.po, tr.po: Moved from i18n to here.
|
|
||||||
* .cvsignore: Moved from i18n to here.
|
|
||||||
|
|
||||||
* POTFILES.in, LINGUAS, Makevars: Created.
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
|
|
||||||
Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
||||||
terms of the GNU General Public License as published by the Free Software
|
|
||||||
Foundation; either version 3 of the License, or (at your option) any later
|
|
||||||
version.
|
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Set of available languages: 24 languages
|
# Set of available languages: 25 languages
|
||||||
|
|
||||||
be da de es fi fr ga gl he hr id it ja ko lt nl pl pt_BR ru sv tr uk vi zh_CN
|
be cs da de es fi fr ga gl he hr id it ja ko lt nl pl pt_BR ru sv tr uk vi zh_CN
|
||||||
|
|
||||||
# Can't seem to get en@quot and en@boldquot to build properly?
|
# Can't seem to get en@quot and en@boldquot to build properly?
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# This is a -*-Makefile-*-
|
# This is a -*-Makefile-*-
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
# Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# List of source files containing translatable strings.
|
# List of source files containing translatable strings.
|
||||||
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
# Copyright (C) 2000-2016 Free Software Foundation, Inc.
|
||||||
# 2010 Free Software Foundation, Inc.
|
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
@@ -24,11 +23,16 @@ expand.c
|
|||||||
file.c
|
file.c
|
||||||
function.c
|
function.c
|
||||||
getopt.c
|
getopt.c
|
||||||
|
guile.c
|
||||||
hash.c
|
hash.c
|
||||||
implicit.c
|
implicit.c
|
||||||
job.c
|
job.c
|
||||||
|
job.h
|
||||||
|
load.c
|
||||||
main.c
|
main.c
|
||||||
misc.c
|
misc.c
|
||||||
|
output.c
|
||||||
|
posixos.c
|
||||||
read.c
|
read.c
|
||||||
remake.c
|
remake.c
|
||||||
remote-cstms.c
|
remote-cstms.c
|
||||||
@@ -40,3 +44,4 @@ variable.h
|
|||||||
vmsfunctions.c
|
vmsfunctions.c
|
||||||
vmsjobs.c
|
vmsjobs.c
|
||||||
vpath.c
|
vpath.c
|
||||||
|
w32/w32os.c
|
||||||
|
|||||||
428
posixos.c
Normal file
428
posixos.c
Normal file
@@ -0,0 +1,428 @@
|
|||||||
|
/* POSIX-based operating system interface for GNU Make.
|
||||||
|
Copyright (C) 2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# include <fcntl.h>
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_PSELECT) && defined(HAVE_SYS_SELECT_H)
|
||||||
|
# include <sys/select.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "job.h"
|
||||||
|
#include "os.h"
|
||||||
|
|
||||||
|
#ifdef MAKE_JOBSERVER
|
||||||
|
|
||||||
|
/* This section provides OS-specific functions to support the jobserver. */
|
||||||
|
|
||||||
|
/* These track the state of the jobserver pipe. Passed to child instances. */
|
||||||
|
static int job_fds[2] = { -1, -1 };
|
||||||
|
|
||||||
|
/* Used to signal read() that a SIGCHLD happened. Always CLOEXEC.
|
||||||
|
If we use pselect() this will never be created and always -1.
|
||||||
|
*/
|
||||||
|
static int job_rfd = -1;
|
||||||
|
|
||||||
|
/* Token written to the pipe (could be any character...) */
|
||||||
|
static char token = '+';
|
||||||
|
|
||||||
|
static int
|
||||||
|
make_job_rfd ()
|
||||||
|
{
|
||||||
|
#ifdef HAVE_PSELECT
|
||||||
|
/* Pretend we succeeded. */
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
EINTRLOOP (job_rfd, dup (job_fds[0]));
|
||||||
|
if (job_rfd >= 0)
|
||||||
|
CLOSE_ON_EXEC (job_rfd);
|
||||||
|
|
||||||
|
return job_rfd;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
jobserver_setup (int slots)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
|
||||||
|
EINTRLOOP (r, pipe (job_fds));
|
||||||
|
if (r < 0)
|
||||||
|
pfatal_with_name (_("creating jobs pipe"));
|
||||||
|
|
||||||
|
if (make_job_rfd () < 0)
|
||||||
|
pfatal_with_name (_("duping jobs pipe"));
|
||||||
|
|
||||||
|
while (slots--)
|
||||||
|
{
|
||||||
|
EINTRLOOP (r, write (job_fds[1], &token, 1));
|
||||||
|
if (r != 1)
|
||||||
|
pfatal_with_name (_("init jobserver pipe"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
jobserver_parse_auth (const char *auth)
|
||||||
|
{
|
||||||
|
/* Given the command-line parameter, parse it. */
|
||||||
|
if (sscanf (auth, "%d,%d", &job_fds[0], &job_fds[1]) != 2)
|
||||||
|
OS (fatal, NILF,
|
||||||
|
_("internal error: invalid --jobserver-auth string '%s'"), auth);
|
||||||
|
|
||||||
|
DB (DB_JOBS,
|
||||||
|
(_("Jobserver client (fds %d,%d)\n"), job_fds[0], job_fds[1]));
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# define FD_OK(_f) (fcntl ((_f), F_GETFD) != -1)
|
||||||
|
#else
|
||||||
|
# define FD_OK(_f) 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Make sure our pipeline is valid, and (possibly) create a duplicate pipe,
|
||||||
|
that will be closed in the SIGCHLD handler. If this fails with EBADF,
|
||||||
|
the parent has closed the pipe on us because it didn't think we were a
|
||||||
|
submake. If so, warn and default to -j1. */
|
||||||
|
|
||||||
|
if (!FD_OK (job_fds[0]) || !FD_OK (job_fds[1]) || make_job_rfd () < 0)
|
||||||
|
{
|
||||||
|
if (errno != EBADF)
|
||||||
|
pfatal_with_name (_("jobserver pipeline"));
|
||||||
|
|
||||||
|
job_fds[0] = job_fds[1] = -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
jobserver_get_auth ()
|
||||||
|
{
|
||||||
|
char *auth = xmalloc ((INTSTR_LENGTH * 2) + 2);
|
||||||
|
sprintf (auth, "%d,%d", job_fds[0], job_fds[1]);
|
||||||
|
return auth;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
jobserver_enabled ()
|
||||||
|
{
|
||||||
|
return job_fds[0] >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
jobserver_clear ()
|
||||||
|
{
|
||||||
|
if (job_fds[0] >= 0)
|
||||||
|
close (job_fds[0]);
|
||||||
|
if (job_fds[1] >= 0)
|
||||||
|
close (job_fds[1]);
|
||||||
|
if (job_rfd >= 0)
|
||||||
|
close (job_rfd);
|
||||||
|
|
||||||
|
job_fds[0] = job_fds[1] = job_rfd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
jobserver_release (int is_fatal)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
EINTRLOOP (r, write (job_fds[1], &token, 1));
|
||||||
|
if (r != 1)
|
||||||
|
{
|
||||||
|
if (is_fatal)
|
||||||
|
pfatal_with_name (_("write jobserver"));
|
||||||
|
perror_with_name ("write", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
jobserver_acquire_all ()
|
||||||
|
{
|
||||||
|
unsigned int tokens = 0;
|
||||||
|
|
||||||
|
/* Close the write side, so the read() won't hang. */
|
||||||
|
close (job_fds[1]);
|
||||||
|
job_fds[1] = -1;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
char intake;
|
||||||
|
int r;
|
||||||
|
EINTRLOOP (r, read (job_fds[0], &intake, 1));
|
||||||
|
if (r != 1)
|
||||||
|
return tokens;
|
||||||
|
++tokens;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prepare the jobserver to start a child process. */
|
||||||
|
void
|
||||||
|
jobserver_pre_child (int recursive)
|
||||||
|
{
|
||||||
|
/* If it's not a recursive make, avoid polutting the jobserver pipes. */
|
||||||
|
if (!recursive && job_fds[0] >= 0)
|
||||||
|
{
|
||||||
|
CLOSE_ON_EXEC (job_fds[0]);
|
||||||
|
CLOSE_ON_EXEC (job_fds[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
jobserver_post_child (int recursive)
|
||||||
|
{
|
||||||
|
#if defined(F_GETFD) && defined(F_SETFD)
|
||||||
|
if (!recursive && job_fds[0] >= 0)
|
||||||
|
for (int i = 0; i < 2; ++i)
|
||||||
|
{
|
||||||
|
int flags;
|
||||||
|
EINTRLOOP (flags, fcntl (job_fds[i], F_GETFD));
|
||||||
|
if (flags >= 0)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
EINTRLOOP (r, fcntl (job_fds[i], F_SETFD, flags & ~FD_CLOEXEC));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
jobserver_signal ()
|
||||||
|
{
|
||||||
|
if (job_rfd >= 0)
|
||||||
|
{
|
||||||
|
close (job_rfd);
|
||||||
|
job_rfd = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
jobserver_pre_acquire ()
|
||||||
|
{
|
||||||
|
/* Make sure we have a dup'd FD. */
|
||||||
|
if (job_rfd < 0 && job_fds[0] >= 0 && make_job_rfd () < 0)
|
||||||
|
pfatal_with_name (_("duping jobs pipe"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PSELECT
|
||||||
|
|
||||||
|
/* Use pselect() to atomically wait for both a signal and a file descriptor.
|
||||||
|
It also provides a timeout facility so we don't need to use SIGALRM.
|
||||||
|
|
||||||
|
This method relies on the fact that SIGCHLD will be blocked everywhere,
|
||||||
|
and only unblocked (atomically) within the pselect() call, so we can
|
||||||
|
never miss a SIGCHLD.
|
||||||
|
*/
|
||||||
|
unsigned int
|
||||||
|
jobserver_acquire (int timeout)
|
||||||
|
{
|
||||||
|
sigset_t empty;
|
||||||
|
fd_set readfds;
|
||||||
|
struct timespec spec;
|
||||||
|
struct timespec *specp = NULL;
|
||||||
|
int r;
|
||||||
|
char intake;
|
||||||
|
|
||||||
|
sigemptyset (&empty);
|
||||||
|
|
||||||
|
FD_ZERO (&readfds);
|
||||||
|
FD_SET (job_fds[0], &readfds);
|
||||||
|
|
||||||
|
if (timeout)
|
||||||
|
{
|
||||||
|
/* Alarm after one second (is this too granular?) */
|
||||||
|
spec.tv_sec = 1;
|
||||||
|
spec.tv_nsec = 0;
|
||||||
|
specp = &spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty);
|
||||||
|
|
||||||
|
if (r == -1)
|
||||||
|
{
|
||||||
|
/* Better be SIGCHLD. */
|
||||||
|
if (errno != EINTR)
|
||||||
|
pfatal_with_name (_("pselect jobs pipe"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r == 0)
|
||||||
|
/* Timeout. */
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* The read FD is ready: read it! */
|
||||||
|
EINTRLOOP (r, read (job_fds[0], &intake, 1));
|
||||||
|
if (r < 0)
|
||||||
|
pfatal_with_name (_("read jobs pipe"));
|
||||||
|
|
||||||
|
/* What does it mean if read() returns 0? It shouldn't happen because only
|
||||||
|
the master make can reap all the tokens and close the write side...?? */
|
||||||
|
return r > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* This method uses a "traditional" UNIX model for waiting on both a signal
|
||||||
|
and a file descriptor. However, it's complex and since we have a SIGCHLD
|
||||||
|
handler installed we need to check ALL system calls for EINTR: painful!
|
||||||
|
|
||||||
|
Read a token. As long as there's no token available we'll block. We
|
||||||
|
enable interruptible system calls before the read(2) so that if we get a
|
||||||
|
SIGCHLD while we're waiting, we'll return with EINTR and we can process the
|
||||||
|
death(s) and return tokens to the free pool.
|
||||||
|
|
||||||
|
Once we return from the read, we immediately reinstate restartable system
|
||||||
|
calls. This allows us to not worry about checking for EINTR on all the
|
||||||
|
other system calls in the program.
|
||||||
|
|
||||||
|
There is one other twist: there is a span between the time reap_children()
|
||||||
|
does its last check for dead children and the time the read(2) call is
|
||||||
|
entered, below, where if a child dies we won't notice. This is extremely
|
||||||
|
serious as it could cause us to deadlock, given the right set of events.
|
||||||
|
|
||||||
|
To avoid this, we do the following: before we reap_children(), we dup(2)
|
||||||
|
the read FD on the jobserver pipe. The read(2) call below uses that new
|
||||||
|
FD. In the signal handler, we close that FD. That way, if a child dies
|
||||||
|
during the section mentioned above, the read(2) will be invoked with an
|
||||||
|
invalid FD and will return immediately with EBADF. */
|
||||||
|
|
||||||
|
static RETSIGTYPE
|
||||||
|
job_noop (int sig UNUSED)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the child handler action flags to FLAGS. */
|
||||||
|
static void
|
||||||
|
set_child_handler_action_flags (int set_handler, int set_alarm)
|
||||||
|
{
|
||||||
|
struct sigaction sa;
|
||||||
|
|
||||||
|
#ifdef __EMX__
|
||||||
|
/* The child handler must be turned off here. */
|
||||||
|
signal (SIGCHLD, SIG_DFL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
memset (&sa, '\0', sizeof sa);
|
||||||
|
sa.sa_handler = child_handler;
|
||||||
|
sa.sa_flags = set_handler ? 0 : SA_RESTART;
|
||||||
|
|
||||||
|
#if defined SIGCHLD
|
||||||
|
if (sigaction (SIGCHLD, &sa, NULL) < 0)
|
||||||
|
pfatal_with_name ("sigaction: SIGCHLD");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined SIGCLD && SIGCLD != SIGCHLD
|
||||||
|
if (sigaction (SIGCLD, &sa, NULL) < 0)
|
||||||
|
pfatal_with_name ("sigaction: SIGCLD");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined SIGALRM
|
||||||
|
if (set_alarm)
|
||||||
|
{
|
||||||
|
/* If we're about to enter the read(), set an alarm to wake up in a
|
||||||
|
second so we can check if the load has dropped and we can start more
|
||||||
|
work. On the way out, turn off the alarm and set SIG_DFL. */
|
||||||
|
if (set_handler)
|
||||||
|
{
|
||||||
|
sa.sa_handler = job_noop;
|
||||||
|
sa.sa_flags = 0;
|
||||||
|
if (sigaction (SIGALRM, &sa, NULL) < 0)
|
||||||
|
pfatal_with_name ("sigaction: SIGALRM");
|
||||||
|
alarm (1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alarm (0);
|
||||||
|
sa.sa_handler = SIG_DFL;
|
||||||
|
sa.sa_flags = 0;
|
||||||
|
if (sigaction (SIGALRM, &sa, NULL) < 0)
|
||||||
|
pfatal_with_name ("sigaction: SIGALRM");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
jobserver_acquire (int timeout)
|
||||||
|
{
|
||||||
|
char intake;
|
||||||
|
int got_token;
|
||||||
|
int saved_errno;
|
||||||
|
|
||||||
|
/* Set interruptible system calls, and read() for a job token. */
|
||||||
|
set_child_handler_action_flags (1, timeout);
|
||||||
|
|
||||||
|
EINTRLOOP (got_token, read (job_rfd, &intake, 1));
|
||||||
|
saved_errno = errno;
|
||||||
|
|
||||||
|
set_child_handler_action_flags (0, timeout);
|
||||||
|
|
||||||
|
if (got_token == 1)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
/* If the error _wasn't_ expected (EINTR or EBADF), fatal. Otherwise,
|
||||||
|
go back and reap_children(), and try again. */
|
||||||
|
errno = saved_errno;
|
||||||
|
|
||||||
|
if (errno != EINTR && errno != EBADF)
|
||||||
|
pfatal_with_name (_("read jobs pipe"));
|
||||||
|
|
||||||
|
if (errno == EBADF)
|
||||||
|
DB (DB_JOBS, ("Read returned EBADF.\n"));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* MAKE_JOBSERVER */
|
||||||
|
|
||||||
|
/* Create a "bad" file descriptor for stdin when parallel jobs are run. */
|
||||||
|
int
|
||||||
|
get_bad_stdin ()
|
||||||
|
{
|
||||||
|
static int bad_stdin = -1;
|
||||||
|
|
||||||
|
/* Set up a bad standard input that reads from a broken pipe. */
|
||||||
|
|
||||||
|
if (bad_stdin == -1)
|
||||||
|
{
|
||||||
|
/* Make a file descriptor that is the read end of a broken pipe.
|
||||||
|
This will be used for some children's standard inputs. */
|
||||||
|
int pd[2];
|
||||||
|
if (pipe (pd) == 0)
|
||||||
|
{
|
||||||
|
/* Close the write side. */
|
||||||
|
(void) close (pd[1]);
|
||||||
|
/* Save the read side. */
|
||||||
|
bad_stdin = pd[0];
|
||||||
|
|
||||||
|
/* Set the descriptor to close on exec, so it does not litter any
|
||||||
|
child's descriptor table. When it is dup2'd onto descriptor 0,
|
||||||
|
that descriptor will not close on exec. */
|
||||||
|
CLOSE_ON_EXEC (bad_stdin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bad_stdin;
|
||||||
|
}
|
||||||
59
prepare_vms.com
Normal file
59
prepare_vms.com
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
$!
|
||||||
|
$! 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:[]config*h-vms.template")
|
||||||
|
$ if config_template .eqs. ""
|
||||||
|
$ then
|
||||||
|
$!
|
||||||
|
$! Try NFS, VMStar, or Pathworks V5 ODS-2 encoded name.
|
||||||
|
$!
|
||||||
|
$ config_template = f$search("sys$disk:[]config.h-vms*template")
|
||||||
|
$ if config_template .eqs. ""
|
||||||
|
$ then
|
||||||
|
$ write sys$output "Could not find config.h-vms*template!"
|
||||||
|
$ exit 44
|
||||||
|
$ endif
|
||||||
|
$ endif
|
||||||
|
$ config_template_file = f$parse(config_template,,,"name")
|
||||||
|
$ config_template_type = f$parse(config_template,,,"type")
|
||||||
|
$ config_template = "sys$disk:[]" + config_template_file + config_template_type
|
||||||
|
$!
|
||||||
|
$!
|
||||||
|
$! Pull the package and 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 (package .eqs. "") .or. (version .eqs. "")
|
||||||
|
$ then
|
||||||
|
$ write sys$output "Unable to determine package and/or version!"
|
||||||
|
$ exit 44
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
|
$!
|
||||||
|
$ outfile = "sys$disk:[]config.h-vms"
|
||||||
|
$!
|
||||||
|
$! 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
|
||||||
|
$ pipe (write sys$output "sub/%PACKAGE%/''package'/WHOLE/NOTYPE" ;-
|
||||||
|
write sys$output "sub/%VERSION%/''version'/WHOLE/NOTYPE" ;-
|
||||||
|
write sys$output "exit") |-
|
||||||
|
edit/edt 'config_template'/out='outfile'/command=sys$pipe >nla0:
|
||||||
|
$!
|
||||||
|
$ write sys$output package, ", version: ", version, " prepared for VMS"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
@echo Windows32 CVS build preparation of config.h.W32 and NMakefile.
|
@echo Windows32 SCM build preparation of config.h.W32 and NMakefile.
|
||||||
if not exist config.h.W32 copy config.h.W32.template config.h.W32
|
if not exist config.h.W32 copy config.h.W32.template config.h.W32
|
||||||
if not exist config.h copy config.h.W32 config.h
|
if not exist config.h copy config.h.W32 config.h
|
||||||
if not exist NMakefile copy NMakefile.template NMakefile
|
if not exist NMakefile copy NMakefile.template NMakefile
|
||||||
|
|||||||
392
readme.vms
392
readme.vms
@@ -1,392 +0,0 @@
|
|||||||
This is the VMS version of GNU Make, updated by Hartmut Becker
|
|
||||||
|
|
||||||
Changes are based on GNU make 3.82.
|
|
||||||
|
|
||||||
This version was built and tested on OpenVMS V7.3 (VAX), V7.3-2 (Alpha) and
|
|
||||||
V8.3-1H1 (I64).
|
|
||||||
|
|
||||||
Build instructions
|
|
||||||
Make a 1st version
|
|
||||||
$ @makefile.com ! ignore any compiler and/or linker warning
|
|
||||||
$ rena make.exe 1st-make.exe
|
|
||||||
Use the 1st version to generate a 2nd version
|
|
||||||
$ mc sys$disk:[]1st-make clean
|
|
||||||
$ mc sys$disk:[]1st-make
|
|
||||||
Verify your 2nd version
|
|
||||||
$ rena make.exe 2nd-make.exe
|
|
||||||
$ mc sys$disk:[]2nd-make clean
|
|
||||||
$ mc sys$disk:[]2nd-make
|
|
||||||
|
|
||||||
Changes (3.81.90)
|
|
||||||
|
|
||||||
Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
|
||||||
timestamps of object modules in OLBs. The timestamps were not correctly
|
|
||||||
adjusted to GMT based time, if the local VMS time was using a daylight saving
|
|
||||||
algorithm and if daylight saving was switched off.
|
|
||||||
|
|
||||||
John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to append
|
|
||||||
output redirection in action lines.
|
|
||||||
|
|
||||||
Rework of ctrl+c and ctrl+y handling.
|
|
||||||
|
|
||||||
Fix a problem with cached strings, which showed on case-insensitive file
|
|
||||||
systems.
|
|
||||||
|
|
||||||
Build fixes for const-ified code in VMS specific sources.
|
|
||||||
|
|
||||||
Build notes:
|
|
||||||
- Try to avoid HP C V7.2-001, which has an incompatible change
|
|
||||||
how __STDC__ is defined. This results at least in compile time warnings.
|
|
||||||
|
|
||||||
- On V8.3-1H1, if you press Ctrl+C you may see a traceback, starting with
|
|
||||||
%SYSTEM-F-CONTROLC, operation completed under CTRL/C
|
|
||||||
%TRACE-F-TRACEBACK, symbolic stack dump follows
|
|
||||||
image module routine line rel PC abs PC
|
|
||||||
|
|
||||||
DECC$SHR C$SIGNAL gsignal 27991 0000000000001180
|
|
||||||
FFFFFFFF84AB2DA0
|
|
||||||
DECC$SHR C$SIGNAL raise 28048 0000000000001280
|
|
||||||
FFFFFFFF84AB2EA0
|
|
||||||
DECC$SHR C$SIGPENDING decc$$deliver_signals
|
|
||||||
12475 0000000000000890
|
|
||||||
FFFFFFFF84C13690
|
|
||||||
...
|
|
||||||
This looks like an incompatibility to the Alpha and VAX behavior, so it looks
|
|
||||||
like a problem in I64 VMS version(s).
|
|
||||||
|
|
||||||
- There is no clean build on VAX. In the environment I tested, I had to use GNU
|
|
||||||
make's alloca which produced a couple of compile time warnings. It seems too
|
|
||||||
much effort to work on a clean build on VAX.
|
|
||||||
|
|
||||||
A note on appending the redirected output. With this change, a simple mechanism
|
|
||||||
is implemented to make ">>" work in action lines. In VMS there is no simple
|
|
||||||
feature like ">>" to have DCL command or program output redirected and appended
|
|
||||||
to a file. GNU make for VMS already implements the redirection of output. If
|
|
||||||
such a redirection is detected, an ">" on the action line, GNU make creates a
|
|
||||||
DCL command procedure to execute the action and to redirect its output. Based
|
|
||||||
on that, now ">>" is also recognized and a similar but different command
|
|
||||||
procedure is created to implement the append. The main idea here is to create a
|
|
||||||
temporary file which collects the output and which is appended to the wanted
|
|
||||||
output file. Then the temporary file is deleted. This is all done in the
|
|
||||||
command procedure to keep changes in make small and simple. This obviously has
|
|
||||||
some limitations but it seems good enough compared with the current ">"
|
|
||||||
implementation. (And in my opinion, redirection is not really what GNU make has
|
|
||||||
to do.) With this approach, it may happen that the temporary file is not yet
|
|
||||||
appended and is left in SYS$SCRATCH. The temporary file names look like
|
|
||||||
"CMDxxxxx.". Any time the created command procedure can not complete, this
|
|
||||||
happens. Pressing Ctrl+Y to abort make is one case. In case of Ctrl+Y the
|
|
||||||
associated command procedure is left in SYS$SCRATCH as well. Its name is
|
|
||||||
CMDxxxxx.COM.
|
|
||||||
|
|
||||||
Change in the Ctrl+Y handling
|
|
||||||
|
|
||||||
Ctrl+Y was: The CtrlY handler called $forcex for the current child.
|
|
||||||
|
|
||||||
Ctrl+Y changed: The CtrlY handler uses $delprc to delete all children. This way
|
|
||||||
also actions with DCL commands will be stopped. As before Ctrl+Y then sends
|
|
||||||
SIGQUIT to itself, which is handled in common code.
|
|
||||||
|
|
||||||
Change in deleteing temporary command files
|
|
||||||
|
|
||||||
Temporary command files were deleted in the main line, after returning from the
|
|
||||||
vms child termination handler. If Ctrl+C was pressed, the handler is called but
|
|
||||||
did not return to main line.
|
|
||||||
|
|
||||||
Now, temporary command files are deleted in the vms child termination
|
|
||||||
handler. That deletes the them even if a Ctrl+C was pressed.
|
|
||||||
|
|
||||||
The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
|
||||||
after the current action is terminated. If that doesn't happen or takes too
|
|
||||||
long, Ctrl+Y should be used instead.
|
|
||||||
|
|
||||||
Changes (3.80)
|
|
||||||
|
|
||||||
. In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
|
||||||
|
|
||||||
. In makefile.vms avoid name collision for glob and globfree.
|
|
||||||
|
|
||||||
In newer version of the VMS CRTL there are glob and globfree implemented.
|
|
||||||
Compiling and linking may result in
|
|
||||||
|
|
||||||
%ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
|
|
||||||
in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
|
|
||||||
%ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
|
|
||||||
in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
|
|
||||||
|
|
||||||
linker messages (and similar for DECC$GLOB). The messages just say, that
|
|
||||||
globfree is a known CRTL whose name was mapped by the compiler to
|
|
||||||
DECC$GLOBFREE. This is done in glob.c as well, so this name is defined
|
|
||||||
twice. One possible solution is to use the VMS versions of glob and
|
|
||||||
globfree. However, then the build environment needs to figure out if
|
|
||||||
there is a new CRTL supporting these or not. This adds complexity. Even
|
|
||||||
more, these functions return VMS file specifications, which is not
|
|
||||||
expected by the other make sources. There is a switch at run time (a VMS
|
|
||||||
logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
|
|
||||||
names. This may conflict with other software. The recommended solution
|
|
||||||
for this is to set this switch just prior to calling main: in an
|
|
||||||
initialization routine. This adds more complexity and more VMS specific
|
|
||||||
code. It is easier to tell the compiler NOT to map the routine names
|
|
||||||
with a simple change in makefile.vms.
|
|
||||||
|
|
||||||
Some notes on case sensitive names in rules and on the disk. In the VMS
|
|
||||||
template for CONFIG.H case sensitive rules can be enabled with defining
|
|
||||||
WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
|
|
||||||
sensitive file system: ODS5. To make use of that, additionally un-defining
|
|
||||||
the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
|
|
||||||
versions of make need to be built to have any case sensitivity for VMS
|
|
||||||
working. Unfortunately, for ODS5 disks that's not all.
|
|
||||||
|
|
||||||
- Usually DCL upcases command line tokens (except strings) and usually the
|
|
||||||
file system is case blind (similar to how Windows systems work)
|
|
||||||
$ set proc/parse=extended/case=sensitive
|
|
||||||
preserves lower and UPPER on the command line and (for this process and all
|
|
||||||
sub-processes) enables case sensitivity in the file system
|
|
||||||
|
|
||||||
- Usually the CRTL tries to reverse what DCL did with command line tokens, it
|
|
||||||
lowercases all tokens (except strings)
|
|
||||||
$ define DECC$ARGV_PARSE_STYLE enable
|
|
||||||
passes (the now preserved) lower and UPPER from the command line to main()
|
|
||||||
|
|
||||||
- Usually the CRTL upcases the arguments to open() and friends
|
|
||||||
$ define DECC$EFS_CASE_PRESERVE enable
|
|
||||||
preserves the names as is.
|
|
||||||
|
|
||||||
It is important to know that not all VMS tools are ready for case sensitivity.
|
|
||||||
With this setup some tools may not work as expected. The setup should not
|
|
||||||
blindly be applied for all users in default login procedures.
|
|
||||||
|
|
||||||
Example? The poor coding gives a compiler message, showing that there are
|
|
||||||
different files:
|
|
||||||
|
|
||||||
$ dir
|
|
||||||
|
|
||||||
Directory ODS5DISK[HB]
|
|
||||||
|
|
||||||
A.c;1 B.c;1 c.c;1 X.c;1
|
|
||||||
x.c;1
|
|
||||||
|
|
||||||
Total of 5 files.
|
|
||||||
$ ods5make x.obj
|
|
||||||
cc /obj=x.obj x.c
|
|
||||||
|
|
||||||
foo(){lowercase_x();}
|
|
||||||
......^
|
|
||||||
%CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
|
|
||||||
at line number 1 in file ODS5DISK[HB]x.c;1
|
|
||||||
$ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
|
|
||||||
cc /obj=X.obj X.c
|
|
||||||
|
|
||||||
foo() {UPPERCASE_X();}
|
|
||||||
.......^
|
|
||||||
%CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
|
|
||||||
at line number 1 in file ODS5DISK[HB]X.c;1
|
|
||||||
$ dir
|
|
||||||
|
|
||||||
Directory ODS5DISK[HB]
|
|
||||||
|
|
||||||
A.c;1 B.c;1 c.c;1 X.c;1
|
|
||||||
x.c;1 X.obj;1 x.obj;1
|
|
||||||
|
|
||||||
Total of 7 files.
|
|
||||||
$
|
|
||||||
|
|
||||||
This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
|
||||||
|
|
||||||
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
|
||||||
by Klaus Kämpf <kkaempf@rmi.de>, the code was based on the VMS port of
|
|
||||||
GNU Make 3.60 by Mike Moretti.
|
|
||||||
|
|
||||||
It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
|
|
||||||
tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
|
|
||||||
versions of DECC were used. VAXC was tried: it fails; but it doesn't
|
|
||||||
seem worth to get it working. There are still some PTRMISMATCH warnings
|
|
||||||
during the compile. Although perl is working on VMS the test scripts
|
|
||||||
don't work. The function $shell is still missing.
|
|
||||||
|
|
||||||
There is a known bug in some of the VMS CRTLs. It is in the shipped
|
|
||||||
versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
|
|
||||||
available ECOs for VMS V7.1 and newer versions. It is fixed in versions
|
|
||||||
shipped with newer VMS versions and all ECO kits after October 1999. It
|
|
||||||
only shows up during the daylight saving time period (DST): stat()
|
|
||||||
returns a modification time 1 hour ahead. This results in GNU make
|
|
||||||
warning messages. For a just created source you will see:
|
|
||||||
|
|
||||||
$ gmake x.exe
|
|
||||||
gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
|
|
||||||
cc /obj=x.obj x.c
|
|
||||||
link x.obj /exe=x.exe
|
|
||||||
gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
|
|
||||||
|
|
||||||
|
|
||||||
New in 3.78.1:
|
|
||||||
|
|
||||||
Fix a problem with automatically remaking makefiles. GNU make uses an
|
|
||||||
execve to restart itself after a successful remake of the makefile. On
|
|
||||||
UNIX systems execve replaces the running program with a new one and
|
|
||||||
resets all signal handling to the default. On VMS execve creates a child
|
|
||||||
process, signal and exit handlers of the parent are still active, and,
|
|
||||||
unfortunately, corrupt the exit code from the child. Fix in job.c:
|
|
||||||
ignore SIGCHLD.
|
|
||||||
|
|
||||||
Added some switches to reflect latest features of DECC. Modifications in
|
|
||||||
makefile.vms.
|
|
||||||
|
|
||||||
Set some definitions to reflect latest features of DECC. Modifications in
|
|
||||||
config.h-vms (which is copied to config.h).
|
|
||||||
|
|
||||||
Added extern strcmpi declaration to avoid 'implicitly declared' messages.
|
|
||||||
Modification in make.h.
|
|
||||||
|
|
||||||
Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
|
|
||||||
Compaq c/c++ compilers. Modifications in default.c.
|
|
||||||
|
|
||||||
Usage of opendir() and friends, suppress file version. Modifications in dir.c.
|
|
||||||
|
|
||||||
Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
|
|
||||||
Modifications in job.c.
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
.SUFFIXES :
|
|
||||||
.SUFFIXES : .class .java
|
|
||||||
.java.class :
|
|
||||||
javac "$<
|
|
||||||
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. The
|
|
||||||
macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
|
|
||||||
Modifications in file.c and config.h-vms.
|
|
||||||
|
|
||||||
Bootstrap make to start building make is still makefile.com, but make
|
|
||||||
needs to be re-made with a make to make a correct version: ignore all
|
|
||||||
possible warnings, delete all objects, rename make.exe to a different
|
|
||||||
name and run it.
|
|
||||||
|
|
||||||
Made some minor modifications to the bootstrap build makefile.com.
|
|
||||||
|
|
||||||
This is the VMS port of GNU Make.
|
|
||||||
|
|
||||||
It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
|
|
||||||
|
|
||||||
This port was done by Klaus Kämpf <kkaempf@rmi.de>
|
|
||||||
|
|
||||||
There is first-level support available from proGIS Software, Germany.
|
|
||||||
Visit their web-site at http://www.progis.de to get information
|
|
||||||
about other vms software and forthcoming updates to gnu make.
|
|
||||||
|
|
||||||
New for 3.77:
|
|
||||||
|
|
||||||
/bin/sh style I/O redirection is supported. You can now write lines like
|
|
||||||
mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
|
|
||||||
|
|
||||||
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 VMS symbols/logicals !
|
|
||||||
|
|
||||||
Functions for file names are working now. See the GNU Make manual for
|
|
||||||
$(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
|
|
||||||
supported as arguments.
|
|
||||||
|
|
||||||
The default rules are set up for GNU C. Building an executable from a
|
|
||||||
single source file is as easy as 'make file.exe'.
|
|
||||||
|
|
||||||
The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
|
|
||||||
different VMS systems can now be written by checking $(ARCH) as in
|
|
||||||
ifeq ($(ARCH),ALPHA)
|
|
||||||
$(ECHO) "On the Alpha"
|
|
||||||
else
|
|
||||||
$(ECHO) "On the VAX"
|
|
||||||
endif
|
|
||||||
|
|
||||||
Command lines of excessive length are correctly broken and written to a
|
|
||||||
batch file in sys$scratch for later execution. There's no limit to the
|
|
||||||
lengths of commands (and no need for .opt files :-) any more.
|
|
||||||
|
|
||||||
Empty commands are handled correctly and don't end in a new DCL process.
|
|
||||||
|
|
||||||
|
|
||||||
New for 3.76:
|
|
||||||
|
|
||||||
John W. Eaton has updated the VMS port to support libraries and VPATH.
|
|
||||||
|
|
||||||
|
|
||||||
To build Make, simply type @makefile. This should compile all the
|
|
||||||
necessary files and link Make. There is also a file called
|
|
||||||
makefile.vms. If you already have GNU Make built you can just use
|
|
||||||
Make with this makefile to rebuild.
|
|
||||||
|
|
||||||
Here are some notes about GNU Make for VMS:
|
|
||||||
|
|
||||||
The cd command is supported if it's called as $(CD). This invokes
|
|
||||||
the 'builtin_cd' command which changes the directory.
|
|
||||||
Calling 'set def' doesn't do the trick, since a sub-shell is
|
|
||||||
spawned for this command, the directory is changed *in this sub-shell*
|
|
||||||
and the sub-shell ends.
|
|
||||||
|
|
||||||
Libraries are not supported. They were in GNU Make 3.60 but somehow I
|
|
||||||
didn't care porting the code. If there is enough interest, I'll do it at
|
|
||||||
some later time.
|
|
||||||
|
|
||||||
The variable $^ separates files with commas instead of spaces (It's the
|
|
||||||
natural thing to do for VMS).
|
|
||||||
|
|
||||||
See defaults.c for VMS default suffixes and my definitions for default
|
|
||||||
rules and variables.
|
|
||||||
|
|
||||||
The shell function is not implemented yet.
|
|
||||||
|
|
||||||
Load average routines haven't been implemented for VMS yet.
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
The default makefiles make looks for are: makefile.vms, gnumakefile,
|
|
||||||
makefile., and gnumakefile. .
|
|
||||||
|
|
||||||
The stat() function and handling of time stamps in VMS is broken, so I
|
|
||||||
replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
|
||||||
somewhere in the future. Be warned, the time resolution inside make is
|
|
||||||
less than what vms provides. This might be a problem on the faster Alphas.
|
|
||||||
|
|
||||||
You can use a : in a filename only if you preceed it with a backslash ('\').
|
|
||||||
E.g.- hobbes\:[bogas.files]
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
Remote stuff isn't implemented yet.
|
|
||||||
|
|
||||||
Multiple line DCL commands, such as "if" statements, must be put inside
|
|
||||||
command files. You can run a command file by using \@.
|
|
||||||
|
|
||||||
|
|
||||||
VMS changes made for 3.74.3
|
|
||||||
|
|
||||||
Lots of default settings are adapted for VMS. See default.c.
|
|
||||||
|
|
||||||
Long command lines are now converted to command files.
|
|
||||||
|
|
||||||
Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
|
||||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
|
||||||
terms of the GNU General Public License as published by the Free Software
|
|
||||||
Foundation; either version 3 of the License, or (at your option) any later
|
|
||||||
version.
|
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with
|
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
119
remote-cstms.c
119
remote-cstms.c
@@ -3,9 +3,7 @@
|
|||||||
Please do not send bug reports or questions about it to
|
Please do not send bug reports or questions about it to
|
||||||
the Make maintainers.
|
the Make maintainers.
|
||||||
|
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
||||||
2010 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
@@ -20,8 +18,7 @@ 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
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "job.h"
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
@@ -34,9 +31,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
|
|
||||||
char *remote_description = "Customs";
|
char *remote_description = "Customs";
|
||||||
|
|
||||||
/* File name of the Customs `export' client command.
|
/* File name of the Customs 'export' client command.
|
||||||
A full path name can be used to avoid some path-searching overhead. */
|
A full path name can be used to avoid some path-searching overhead. */
|
||||||
#define EXPORT_COMMAND "/usr/local/bin/export"
|
#define EXPORT_COMMAND "/usr/local/bin/export"
|
||||||
|
|
||||||
/* ExportPermit gotten by start_remote_job_p, and used by start_remote_job. */
|
/* ExportPermit gotten by start_remote_job_p, and used by start_remote_job. */
|
||||||
static ExportPermit permit;
|
static ExportPermit permit;
|
||||||
@@ -78,11 +75,11 @@ start_remote_job_p (int first_p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For secure Customs, make is installed setuid root and
|
/* For secure Customs, make is installed setuid root and
|
||||||
Customs requires a privileged source port be used. */
|
Customs requires a privileged source port be used. */
|
||||||
make_access ();
|
make_access ();
|
||||||
|
|
||||||
if (ISDB (DB_JOBS))
|
if (ISDB (DB_JOBS))
|
||||||
Rpc_Debug(1);
|
Rpc_Debug (1);
|
||||||
|
|
||||||
/* Ping the daemon once to see if it is there. */
|
/* Ping the daemon once to see if it is there. */
|
||||||
inited = Customs_Ping () == RPC_SUCCESS ? 1 : -1;
|
inited = Customs_Ping () == RPC_SUCCESS ? 1 : -1;
|
||||||
@@ -91,20 +88,20 @@ start_remote_job_p (int first_p)
|
|||||||
user_access ();
|
user_access ();
|
||||||
|
|
||||||
if (starting_directory == 0)
|
if (starting_directory == 0)
|
||||||
/* main couldn't figure it out. */
|
/* main couldn't figure it out. */
|
||||||
inited = -1;
|
inited = -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Normalize the current directory path name to something
|
/* Normalize the current directory path name to something
|
||||||
that should work on all machines exported to. */
|
that should work on all machines exported to. */
|
||||||
|
|
||||||
normalized_cwd = xmalloc (GET_PATH_MAX);
|
normalized_cwd = xmalloc (GET_PATH_MAX);
|
||||||
strcpy (normalized_cwd, starting_directory);
|
strcpy (normalized_cwd, starting_directory);
|
||||||
if (Customs_NormPath (normalized_cwd, GET_PATH_MAX) < 0)
|
if (Customs_NormPath (normalized_cwd, GET_PATH_MAX) < 0)
|
||||||
/* Path normalization failure means using Customs
|
/* Path normalization failure means using Customs
|
||||||
won't work, but it's not really an error. */
|
won't work, but it's not really an error. */
|
||||||
inited = -1;
|
inited = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inited < 0)
|
if (inited < 0)
|
||||||
@@ -112,7 +109,7 @@ start_remote_job_p (int first_p)
|
|||||||
|
|
||||||
njobs = job_slots_used;
|
njobs = job_slots_used;
|
||||||
if (!first_p)
|
if (!first_p)
|
||||||
njobs -= 1; /* correction for being called from reap_children() */
|
njobs -= 1; /* correction for being called from reap_children() */
|
||||||
|
|
||||||
/* the first job should run locally, or, if the -l flag is given, we use
|
/* the first job should run locally, or, if the -l flag is given, we use
|
||||||
that as clue as to how many local jobs should be scheduled locally */
|
that as clue as to how many local jobs should be scheduled locally */
|
||||||
@@ -154,7 +151,7 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||||||
retsock = Rpc_UdpCreate (True, 0);
|
retsock = Rpc_UdpCreate (True, 0);
|
||||||
if (retsock < 0)
|
if (retsock < 0)
|
||||||
{
|
{
|
||||||
error (NILF, "exporting: Couldn't create return socket.");
|
O (error, NILF, "exporting: Couldn't create return socket.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,9 +170,9 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||||||
|
|
||||||
/* Create a WayBill to give to the server. */
|
/* Create a WayBill to give to the server. */
|
||||||
len = Customs_MakeWayBill (&permit, normalized_cwd, argv[0], argv,
|
len = Customs_MakeWayBill (&permit, normalized_cwd, argv[0], argv,
|
||||||
envp, retport, waybill);
|
envp, retport, waybill);
|
||||||
|
|
||||||
/* Modify the waybill as if the remote child had done `child_access ()'. */
|
/* Modify the waybill as if the remote child had done 'child_access ()'. */
|
||||||
{
|
{
|
||||||
WayBill *wb = (WayBill *) waybill;
|
WayBill *wb = (WayBill *) waybill;
|
||||||
wb->ruid = wb->euid;
|
wb->ruid = wb->euid;
|
||||||
@@ -189,53 +186,55 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||||||
sin.sin_port = htons (Customs_Port ());
|
sin.sin_port = htons (Customs_Port ());
|
||||||
sin.sin_addr = permit.addr;
|
sin.sin_addr = permit.addr;
|
||||||
status = Rpc_Call (sock, &sin, (Rpc_Proc) CUSTOMS_IMPORT,
|
status = Rpc_Call (sock, &sin, (Rpc_Proc) CUSTOMS_IMPORT,
|
||||||
len, (Rpc_Opaque) waybill,
|
len, (Rpc_Opaque) waybill,
|
||||||
sizeof(msg), (Rpc_Opaque) msg,
|
sizeof (msg), (Rpc_Opaque) msg,
|
||||||
1, &timeout);
|
1, &timeout);
|
||||||
|
|
||||||
host = gethostbyaddr((char *)&permit.addr, sizeof(permit.addr), AF_INET);
|
host = gethostbyaddr ((char *)&permit.addr, sizeof(permit.addr), AF_INET);
|
||||||
|
|
||||||
if (status != RPC_SUCCESS)
|
{
|
||||||
{
|
const char *hnm = host ? host->h_name : inet_ntoa (permit.addr);
|
||||||
(void) close (retsock);
|
size_t hlen = strlen (hnm);
|
||||||
(void) close (sock);
|
|
||||||
error (NILF, "exporting to %s: %s",
|
|
||||||
host ? host->h_name : inet_ntoa (permit.addr),
|
|
||||||
Rpc_ErrorMessage (status));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (msg[0] != 'O' || msg[1] != 'k' || msg[2] != '\0')
|
|
||||||
{
|
|
||||||
(void) close (retsock);
|
|
||||||
(void) close (sock);
|
|
||||||
error (NILF, "exporting to %s: %s",
|
|
||||||
host ? host->h_name : inet_ntoa (permit.addr),
|
|
||||||
msg);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
error (NILF, "*** exported to %s (id %u)",
|
|
||||||
host ? host->h_name : inet_ntoa (permit.addr),
|
|
||||||
permit.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
fflush (stdout);
|
if (status != RPC_SUCCESS)
|
||||||
fflush (stderr);
|
{
|
||||||
|
const char *err = Rpc_ErrorMessage (status);
|
||||||
|
(void) close (retsock);
|
||||||
|
(void) close (sock);
|
||||||
|
error (NILF, hlen + strlen (err),
|
||||||
|
"exporting to %s: %s", hnm, err);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (msg[0] != 'O' || msg[1] != 'k' || msg[2] != '\0')
|
||||||
|
{
|
||||||
|
(void) close (retsock);
|
||||||
|
(void) close (sock);
|
||||||
|
error (NILF, hlen + strlen (msg), "exporting to %s: %s", hnm, msg);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error (NILF, hlen + INTSTR_LENGTH,
|
||||||
|
"*** exported to %s (id %u)", hnm, permit.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush (stdout);
|
||||||
|
fflush (stderr);
|
||||||
|
}
|
||||||
|
|
||||||
pid = vfork ();
|
pid = vfork ();
|
||||||
if (pid < 0)
|
if (pid < 0)
|
||||||
{
|
{
|
||||||
/* The fork failed! */
|
/* The fork failed! */
|
||||||
perror_with_name ("vfork", "");
|
perror_with_name ("fork", "");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (pid == 0)
|
else if (pid == 0)
|
||||||
{
|
{
|
||||||
/* Child side. Run `export' to handle the connection. */
|
/* Child side. Run 'export' to handle the connection. */
|
||||||
static char sock_buf[20], retsock_buf[20], id_buf[20];
|
static char sock_buf[20], retsock_buf[20], id_buf[20];
|
||||||
static char *new_argv[6] =
|
static char *new_argv[6] =
|
||||||
{ EXPORT_COMMAND, "-id", sock_buf, retsock_buf, id_buf, 0 };
|
{ EXPORT_COMMAND, "-id", sock_buf, retsock_buf, id_buf, 0 };
|
||||||
|
|
||||||
/* Set up the arguments. */
|
/* Set up the arguments. */
|
||||||
(void) sprintf (sock_buf, "%d", sock);
|
(void) sprintf (sock_buf, "%d", sock);
|
||||||
@@ -244,7 +243,7 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||||||
|
|
||||||
/* Get the right stdin. */
|
/* Get the right stdin. */
|
||||||
if (stdin_fd != 0)
|
if (stdin_fd != 0)
|
||||||
(void) dup2 (stdin_fd, 0);
|
(void) dup2 (stdin_fd, 0);
|
||||||
|
|
||||||
/* Unblock signals in the child. */
|
/* Unblock signals in the child. */
|
||||||
unblock_sigs ();
|
unblock_sigs ();
|
||||||
@@ -253,7 +252,7 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||||||
exec_command (new_argv, envp);
|
exec_command (new_argv, envp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parent side. Return the `export' process's ID. */
|
/* Parent side. Return the 'export' process's ID. */
|
||||||
(void) close (retsock);
|
(void) close (retsock);
|
||||||
(void) close (sock);
|
(void) close (sock);
|
||||||
*is_remote = 0;
|
*is_remote = 0;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user